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.
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.
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):
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.
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):
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 ?
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 recordthis.sandbox.publish("PushHistoryState", {hash: hash});
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 -
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.
Are there any restrictions around which schemas/objects or kinds of changes, these entity events will get triggered for?
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?
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.
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.
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.
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?