
I have covered previously how to navigate to a record in Creatio. To do this, you need a URL hash. This hash looks something like this:
CardModuleV2/ContactPageV2/edit/c4ed336c-3e9b-40fe-8b82-5632476472b4 -OR- CardModuleV2/UsrMyCustomSection1Page/edit/f1bca3c3-ce51-4955-bdc0-34ec8319ae82
This is made up of parts such as a module name, a page name, and record Id, etc. However, what if you know the entity name and also have a record Id, but don’t know what the “page” would be? Additionally, some sections have multiple edit pages that can differ based on some value of the record. There is a module named NetworkUtilities you can use in Creatio for just this purpose. You provide an entity name and a record Id, and it gives you back the hash so you can navigate to the record correctly.
To use this module, you must include NetworkUtilities in the modules list at the top of the code. For example, if we were on the Contact page, adding this would look something like this:
define("ContactPageV2", ["NetworkUtilities"], function(NetworkUtilities) { return { entitySchemaName: "Contact", //... } });
Now, with that added, we can use it as follows to get the hash for a record given it’s entity name and record Id.
var entityName = "Contact"; var entityId = "c4ed336c-3e9b-40fe-8b82-5632476472b4"; var contactHash = NetworkUtilities.getEntityUrl(entityName, entityId);
Now, you can simply use that hash to navigate to the record normally:
this.sandbox.publish("PushHistoryState", {hash: contactHash});
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!