Hi Community, I'm trying to create a system, that allows me to easily assign Brands and Models to Products and spare parts, to make it easier for the support teams and sales team to find related products. For the "main" products i.e a laptop, this is easy enough, i.e Brand: Lenove, Model: Thinkpad 4

 

However, now that I'm looking at spare parts the same logic becomes much more difficult i.e a charging cable. The charging cable might be suitable for Lenove Laptops and Asus Laptops and multiple models of each. 

 

How do I assign multiple brands and models to that charger? The only options I see is to create merged brands and model i.e "Asus, Lenovo", however I am worried that this will get very messy very quickly and impossible to maintain as new products get added to the inventory... 

 

In the perfect world, I would like to be able to open any product and have a filtered list by (product brand and product model) on the same page, which will display all spare parts and accessories that is compatible with that product. 

 

Does anyone else face similar issues? Maybe I'm just overthinking it all and there is a really easy solution to it :)!

 

Thank you in advance!

 

Julia 

 

 

Like 0

Like

3 comments

Hello!

Thank you for the detailed description of the problem. The implementation you described assumes the use of a many-to-many relationship, which cannot be supported directly in the relational database structure.


Please note that in relational databases, the many-to-many relationship cannot be directly implemented because it violates the principles of the relational model, which is based on atomic data and normalization. Instead, such relationships are resolved using an intermediate (junction) table.

These are tables that reference two other tables and define the relationships between them. For instance, if we have Table 1 and Table 2, and we need to establish a multi-relationship between them (e.g., linking a record in Table 1 to multiple records in Table 2), we would create a junction table. This table would contain references to both tables and define the dependencies.

This approach allows us to implement a multi-selection mechanism, such as associating a product with multiple brands or categories (e.g., one product having three or more associated brands).

 

Here’s an example of how the table could look:

CompatibilityID    ProductID    BrandID
1                             101                1
2                             102                1

3                             101                2

Thank you Arsenii Ostapyk, that seems like it may be the solution to my problem. I have done a search through Creatio Academy for "junction" or "junction table". Can you point me in the right direction on where I can find information on how I go setting this up?

 

Julia Molnar,

 

Please note that we do not have any instructions or examples for this, since the question relates to the general Database structure principles, rather than to the Creatio system functionality. However, you are welcome to use the public open sources for more in-depth details on the subject.

Show all comments

When we are creating a case using single object, the cases are getting created. But when we are trying to create using multiple objects we are getting the null response. I'm posting the requests and response and the screenshots below.

Like 0

Like

2 comments
Best reply

Hello,

 

The InsertQuery endpoint in the DataService doesn't support an array of objects in the body. If you are using InsertQuery for data creation, you can pass only one record (object) in the body. You can use BatchQuery, which contains an array of InsertQueries, or other endpoints of the DataService to create multiple records.

 

More information about DataService can be found here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/dataservice-references

 

But I recommend using the OData v4 API for data access from an integration. You can find additional information about OData v4 in the Creatio Academy article here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/category/odata

 

Also here is a body for the BatchQuery (example) to insert two case records into the system (maybe it will be helpful). The endpoint to call is /0/DataService/json/SyncReply/BatchQuery (POST request):

{
   "items":[
      {
         "__type":"Terrasoft.Nui.ServiceModel.DataContract.InsertQuery",
         "operationType":1,
         "rootSchemaName":"Case",
         "columnValues":{
            "items":{
               "CreatedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "ModifiedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "Number":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Subject":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":"Test (from Postman 1)"
                  }
               },
               "Symptoms":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Owner":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ResponseDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "Status":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"New",
                        "primaryColorValue":"#0058EF",
                        "value":"ae5f2f10-f46b-1410-fd9a-0050ba5d6c38"
                     }
                  }
               },
               "Priority":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Medium",
                        "primaryColorValue":null,
                        "value":"d9bd322c-f46b-1410-ee8c-0050ba5d6c38"
                     }
                  }
               },
               "Origin":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Call",
                        "primaryColorValue":null,
                        "value":"5e5e202a-f46b-1410-3692-0050ba5d6c38"
                     }
                  }
               },
               "Account":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Contact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "IsChanged":false,
                        "PrimaryModelMode":"update",
                        "HasUnsavedData":false,
                        "value":"c4ed336c-3e9b-40fe-8b82-5632476472b4",
                        "displayValue":"Andrew Baker (sample)",
                        "State":"Active"
                     }
                  }
               },
               "Group":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "RespondedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureCode":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Solution":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "SatisfactionLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Category":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SatisfactionLevelComment":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "ServiceItem":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ServicePact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "FirstSolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolvedOnSupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"1st-line support",
                        "primaryColorValue":null,
                        "value":"ff7f2f92-f36b-1410-3d9c-0050ba5d6c38"
                     }
                  }
               },
               "ParentCase":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               }
            }
         },
         "queryKind":0
      },
      {
         "__type":"Terrasoft.Nui.ServiceModel.DataContract.InsertQuery",
         "operationType":1,
         "rootSchemaName":"Case",
         "columnValues":{
            "items":{
               "CreatedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "ModifiedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "Number":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Subject":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":"Test (from Postman 2)"
                  }
               },
               "Symptoms":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Owner":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ResponseDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "Status":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"New",
                        "primaryColorValue":"#0058EF",
                        "value":"ae5f2f10-f46b-1410-fd9a-0050ba5d6c38"
                     }
                  }
               },
               "Priority":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Medium",
                        "primaryColorValue":null,
                        "value":"d9bd322c-f46b-1410-ee8c-0050ba5d6c38"
                     }
                  }
               },
               "Origin":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Call",
                        "primaryColorValue":null,
                        "value":"5e5e202a-f46b-1410-3692-0050ba5d6c38"
                     }
                  }
               },
               "Account":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Contact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "IsChanged":false,
                        "PrimaryModelMode":"update",
                        "HasUnsavedData":false,
                        "value":"c4ed336c-3e9b-40fe-8b82-5632476472b4",
                        "displayValue":"Andrew Baker (sample)",
                        "State":"Active"
                     }
                  }
               },
               "Group":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "RespondedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureCode":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Solution":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "SatisfactionLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Category":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SatisfactionLevelComment":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "ServiceItem":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ServicePact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "FirstSolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolvedOnSupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"1st-line support",
                        "primaryColorValue":null,
                        "value":"ff7f2f92-f36b-1410-3d9c-0050ba5d6c38"
                     }
                  }
               },
               "ParentCase":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               }
            }
         },
         "queryKind":0
      }
   ],
   "includeProcessExecutionData":true
}

Hello,

 

The InsertQuery endpoint in the DataService doesn't support an array of objects in the body. If you are using InsertQuery for data creation, you can pass only one record (object) in the body. You can use BatchQuery, which contains an array of InsertQueries, or other endpoints of the DataService to create multiple records.

 

More information about DataService can be found here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/dataservice-references

 

But I recommend using the OData v4 API for data access from an integration. You can find additional information about OData v4 in the Creatio Academy article here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/category/odata

 

Also here is a body for the BatchQuery (example) to insert two case records into the system (maybe it will be helpful). The endpoint to call is /0/DataService/json/SyncReply/BatchQuery (POST request):

{
   "items":[
      {
         "__type":"Terrasoft.Nui.ServiceModel.DataContract.InsertQuery",
         "operationType":1,
         "rootSchemaName":"Case",
         "columnValues":{
            "items":{
               "CreatedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "ModifiedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "Number":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Subject":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":"Test (from Postman 1)"
                  }
               },
               "Symptoms":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Owner":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ResponseDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "Status":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"New",
                        "primaryColorValue":"#0058EF",
                        "value":"ae5f2f10-f46b-1410-fd9a-0050ba5d6c38"
                     }
                  }
               },
               "Priority":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Medium",
                        "primaryColorValue":null,
                        "value":"d9bd322c-f46b-1410-ee8c-0050ba5d6c38"
                     }
                  }
               },
               "Origin":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Call",
                        "primaryColorValue":null,
                        "value":"5e5e202a-f46b-1410-3692-0050ba5d6c38"
                     }
                  }
               },
               "Account":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Contact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "IsChanged":false,
                        "PrimaryModelMode":"update",
                        "HasUnsavedData":false,
                        "value":"c4ed336c-3e9b-40fe-8b82-5632476472b4",
                        "displayValue":"Andrew Baker (sample)",
                        "State":"Active"
                     }
                  }
               },
               "Group":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "RespondedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureCode":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Solution":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "SatisfactionLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Category":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SatisfactionLevelComment":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "ServiceItem":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ServicePact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "FirstSolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolvedOnSupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"1st-line support",
                        "primaryColorValue":null,
                        "value":"ff7f2f92-f36b-1410-3d9c-0050ba5d6c38"
                     }
                  }
               },
               "ParentCase":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               }
            }
         },
         "queryKind":0
      },
      {
         "__type":"Terrasoft.Nui.ServiceModel.DataContract.InsertQuery",
         "operationType":1,
         "rootSchemaName":"Case",
         "columnValues":{
            "items":{
               "CreatedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "ModifiedBy":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Supervisor",
                        "primaryColorValue":null,
                        "value":"410006e1-ca4e-4502-a9ec-e54d922d2c00"
                     }
                  }
               },
               "Number":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Subject":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":"Test (from Postman 2)"
                  }
               },
               "Symptoms":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "Owner":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ResponseDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "Status":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"New",
                        "primaryColorValue":"#0058EF",
                        "value":"ae5f2f10-f46b-1410-fd9a-0050ba5d6c38"
                     }
                  }
               },
               "Priority":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Medium",
                        "primaryColorValue":null,
                        "value":"d9bd322c-f46b-1410-ee8c-0050ba5d6c38"
                     }
                  }
               },
               "Origin":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"Call",
                        "primaryColorValue":null,
                        "value":"5e5e202a-f46b-1410-3692-0050ba5d6c38"
                     }
                  }
               },
               "Account":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Contact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "IsChanged":false,
                        "PrimaryModelMode":"update",
                        "HasUnsavedData":false,
                        "value":"c4ed336c-3e9b-40fe-8b82-5632476472b4",
                        "displayValue":"Andrew Baker (sample)",
                        "State":"Active"
                     }
                  }
               },
               "Group":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "RespondedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureDate":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "ClosureCode":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Solution":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "SatisfactionLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "Category":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SatisfactionLevelComment":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":1,
                     "value":null
                  }
               },
               "ServiceItem":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "ServicePact":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "FirstSolutionProvidedOn":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":7,
                     "value":null
                  }
               },
               "SolvedOnSupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               },
               "SupportLevel":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":{
                        "displayValue":"1st-line support",
                        "primaryColorValue":null,
                        "value":"ff7f2f92-f36b-1410-3d9c-0050ba5d6c38"
                     }
                  }
               },
               "ParentCase":{
                  "expressionType":2,
                  "parameter":{
                     "dataValueType":10,
                     "value":null
                  }
               }
            }
         },
         "queryKind":0
      }
   ],
   "includeProcessExecutionData":true
}

Thank you,it is working as expected 

Show all comments

Hi community,

 

I am debugging a client's environment and I was wondering which is the table in the database which contains the relation between the object and its edit pages ?

 

For example, for the "Case" section, in the "Section wizard" I could have multiple edit pages (e.g. one for each type of service). Where can I find, in the database, all those edit pages ? Is there a way to find them or are these edit pages only visible as a "Client module" in the advances settings ?

 

Many thanks for these technical clarifications.

 

Best regards,

Jonathan

 

Like 0

Like

1 comments

If what you're after is the ability to navigate to the correct page, you can do that with the NetworkUtilities module. It allows you to get the hash to navigate to based on an entity object name and an Id. 

// entitySchemaName = "Account"
// entityId = An account Id
 
var hash = NetworkUtilities.getEntityUrl(entitySchemaName, entityId);
this.sandbox.publish("PushHistoryState", { "hash": hash });

If the entity has different pages based on an field, such as Type, you can also pass that like this: 

// entitySchemaName = "Case"
// entityId = A case Id
// typeValue = the Id/value of a field that determines the page, such as Type
 
var hash = NetworkUtilities.getEntityUrl(entitySchemaName, entityId, typeValue);
this.sandbox.publish("PushHistoryState", { "hash": hash });

You can determine if the entity has multiple pages, and the field used to determine which page by looking at the object attribute here (this will give you the field used to determine the page):

// entitySchemaName = "Case"
 
Terrasoft.configuration.ModuleStructure[entitySchemaName].attribute
 
// example for Landing pages (since they have multiple pages: 
var columnName = Terrasoft.configuration.ModuleStructure.GeneratedWebForm.attribute;
 
// Now columnName has the name of the field used to determine the page, in this case it is "Type"

So, the complete picture would look something like:

 

var entityName = "Account";
var entityId = "SomeAccountIdValue";
var typeValue = null;
 
// check if has multiple pages
var col = Terrasoft.configuration.ModuleStructure[entityName].attribute;
if (col) {
    // get the type value however based on your scenario
    typeValue = this.get(col);
}
 
// now get the url hash
var hash = NetworkUtilities.getEntityUrl(entityName, entityId, typeValue);
// navigate to record
this.sandbox.publish("PushHistoryState", {hash: hash});

 

Show all comments

Hello Community,

 

The Entity event layer is a powerful tool to listen to changes to schemas on the server side and perform actions based on them. The documentation states the following - 

The Entity event layer mechanism is triggered after executing the event subprocesses of an object.

 

Few questions below - 

  1. Are entity events triggered for all system schemas & custom schemas? We know it works with Custom schemas, but we have had a few instances where it did not get triggered for system schemas Eg 'System administration object' or 'Image' object. We also notice that a business process with Start signal tied to the "System administration object" or 'Image" object also doesn't work. 
  2.  Are there any restrictions around which schemas/objects or kinds of changes, these entity events will get triggered for?
  3. Are the entity layer events triggered on the server exactly the same as the 'Signal' start events that we configure in the Business process designer?
Like 2

Like

5 comments
Best reply

Dear Shrikanth,

 

1.  It is triggered for all entity objects present in the configuration section.

 

2. It gets triggered by any CRUD operations performed using DataServevice (Entity and EntitySchemaQuery), OData, and OOTB business process elements. It will not get triggered if data is changed using Insert, Update, Delete classes, and if data is changed directly on the DB level.

 

3. It works the same as the Event subprocess https://academy.creatio.com/documents/technic-bpms/7-16/event-sub-process-element

 

Best regards,

Angela

Dear Shrikanth,

 

1.  It is triggered for all entity objects present in the configuration section.

 

2. It gets triggered by any CRUD operations performed using DataServevice (Entity and EntitySchemaQuery), OData, and OOTB business process elements. It will not get triggered if data is changed using Insert, Update, Delete classes, and if data is changed directly on the DB level.

 

3. It works the same as the Event subprocess https://academy.creatio.com/documents/technic-bpms/7-16/event-sub-process-element

 

Best regards,

Angela

Angela Reyes,

Thank you Angela for your clear responses.



I am presuming that there are no special settings to be done to enabled for them to be triggered on System objects. Hence, our errors are not the expected behavior is what I understand.

Angela Reyes,

Hi Angela. Quick follow up question - 



1. Do entity events get triggered for virtual objects & views as well? Virtual objects are also objects displayed in Configuration. So going by your explanation, It should. Can you confirm?

2. Are entity events listenable on the Client side? I do not think so. Can you confirm?

M Shrikanth,

1) I have not checked it - try to create a test process and check it. 

2) If you set up sending of an event it can be done. 

 

Best regards,

Angela

Arsenii Pelekh,

Hello,

 

You can find information on this subject here:

https://academy.creatio.com/docs/developer/back_end_development/objects…

Show all comments