Hi Team,



I have been trying to add a record in one of the lookup. Upon saving I get a below error.

 

From UI, Debugged to find the below, i.e. an object is missing in the config.

But it is available in DB.



It is inferred that object is deleted in Configuration but available in DB.



Note: This error persists across the application, when I tried to save record in any section this error pop-up.

 

ViewModule.aspx

"SBLChequeBook":{

      "imageId":"026742d9-390c-4778-bc46-9fa85c42677a",

      "moduleId":"f07b0621-39c1-4269-a3e5-dd013dca1e82",

      "moduleCaption":"Cheque Book",

      "entitySchemaName":"SBLChequeBook",

      "entitySchemaUId":"f3edef5e-3b47-4fd7-89bd-34c3681a4e57",

      "sectionModule":"SectionModuleV2",

      "cardModule":"CardModuleV2",

      "hide":"true"

   },





kindly guide me to overcome this!







Best Regards,

BHoobalan P.

Like 0

Like

2 comments

Hi Bhoobalan,

 

Please delete mentioning of the deleted object from the SysModule table:

 

DELETE SysModule WHERE SysModuleEntityId = 'f07b0621-39c1-4269-a3e5-dd013dca1e82'

OR Id = 'f07b0621-39c1-4269-a3e5-dd013dca1e82'

 

and relogin to the application after that. This should completely remove all the mentions about the deleted object from the system.

 

Best regards,

Oscar

Oscar Dylan,



Thanks much!

Show all comments

Hi all,

I am trying to insert a record to an entity using esq as follows in my web service.

[OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare,
        ResponseFormat = WebMessageFormat.Json)]
        public string InsertCaseESQPostForSATS(DebitCardDataForSATS debitCardData)
        {
            try
            {
                var caseSchema = SystemUserConnection.EntitySchemaManager.GetInstanceByName("SBLSRM");
                var entity = caseSchema.CreateEntity(SystemUserConnection);
                entity.SetColumnValue("SBLAccountNumber", debitCardData.AccountNo);
                entity.SetColumnValue("SBLService", debitCardData.ServiceId);
                
                entity.SetDefColumnValues();
                var result = entity.Save();
                return result.ToString();
            }
            catch(Exception ex)
            {
                return ex.Message;
            }
        }

 

Column 'SBLService' is a lookup column and I am having problem while inserting a record, says, "Value 'SBLService' was not found.". I have checked and confirmed that the object has the column and is published fine. Can somebody assist me on this? How can I set value for a lookup column?

 

 

Like 0

Like

4 comments
Best reply

Roman Raj Bajracharya,

 

the value should be passed as an actual Id and also the column name shouldn't contain the . separator:

 

entity.SetColumnValue("SBLServiceId", Id here);

 

For example see this post https://community.creatio.com/questions/how-create-or-update-record-usi… where Dmytro provided an example of working with GUID columns.

 

Best regards,

Oscar

Hi,

 

Try SBLServiceId instead and also take a look in the database and check how is this column called there.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

Thank you for the reply. How do I provide the value of Id of SBLService lookup? In the database, it is just 'Id' for the lookup id. I tried to access by doing SBLService.Id but it didn't help.

entity.SetColumnValue("SBLService.Id", debitCardData.ServiceId);

 

Roman Raj Bajracharya,

 

the value should be passed as an actual Id and also the column name shouldn't contain the . separator:

 

entity.SetColumnValue("SBLServiceId", Id here);

 

For example see this post https://community.creatio.com/questions/how-create-or-update-record-usi… where Dmytro provided an example of working with GUID columns.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

Thank you very much. The record is now inserted. But I am having problem on the execution of a process that should occur when a record on this entity is created. This process is executing well when I create a new record from frontend(UI). Any ideas on this?

Show all comments

Hello,

I have developed one service which inserts contact and contact-address from the third party to bpm'online. I have written below code to add contact and its Address simultaneously:

var insertContactQuery = new InsertQuery()

{

                    // Root schema name.

                    RootSchemaName = "Contact",

                    OperationType = QueryOperationType.Insert,

                    // New column values.

                    ColumnValues = new ColumnValues()

                    {

                        // Key-value collection.

                        Items = new Dictionary()

                                 {

                                     {

                                         "Account",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Account",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.AccountId,

                                                 DataValueType = DataValueType.Lookup

                                             }

                                         }

                                     },

                                     {

                                         "Name",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Name",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreContactFirstName + " " + item.StoreContactLastName,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "MobilePhone",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "MobilePhone",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StorePhoneNumber,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "ContactAddress",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Address",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreStreetAddress,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "ContactCity",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "City",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreCityName,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     },

                                     {

                                         "ContactZip",

                                         new ColumnExpression()

                                         {

                                             ExpressionType = EntitySchemaQueryExpressionType.Parameter,

                                             ColumnPath = "Zip",

                                             Parameter = new Terrasoft.Nui.ServiceModel.DataContract.Parameter()

                                             {

                                                 Value = item.StoreZipCode,

                                                 DataValueType = DataValueType.Text

                                             }

                                         }

                                     }

                                 }

                    }

                };

am I doing something wrong? Please guide.

Like 0

Like

4 comments

Dear Riddhi,

Unfortunately, it is not possible to add data to the “Contact” and “ContactAddress” tables simultaneously using the approach that was described early. However, we can offer two ways solving the issue:

1. In order to add data via DataService please do the following:

-Create custom columns in the “Contact” object for storing the corresponding address values.

-Create a business process that will take the values from these columns and add them to the corresponding columns from the “ContactAddress” table.

Please note that we do not recommend using DataService for adding data to the database.

2. Create a web service for adding data. This approach is recommended for solving such types of the issues.

Best regards,

Norton

Norton Lingard,

Thanks, Norton. Can you please provide any reference link or example for adding records with web service? It would be really grateful.

Dear Riddhi,

Please find more information by link below:

https://academy.bpmonline.com/documents/technic-sdk/7-14/how-run-bpmonline-processes-web-service

Best regards,

Norton

Norton Lingard,

Thanks

Show all comments

How to apply access permissions (object permission) / access right when insert data via server-side?

I have set the record access permission, but when inserting via server-side, the access right does not work. The insert method that I did was in accordance with the article above.

Thanks.

Like 0

Like

1 comments

Hi,

It is possible adding data via server-side with access permissions using the “Entity” class. Please find more information with the examples by the link below:

https://academy.bpmonline.com/documents/technic-sdk/7-13/working-database-entity-class

Best regards,

Norton  

Show all comments