What is the table which contains the relation between the object and its edit pages ?
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
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});