Hi, I need get the record url dynamically and embedded in an external link. For example, I have a grid in an external page to show the all records, how can I have those records linked to dynamics crm records. the current url is like the below:
https://crm1.(company)).com/organization/main.aspx?etc=10008&extraqs=formid%3d1e2af387-1b92-41b1-82ed-b61ed70712e5&id=%7b73D0A6F0-7815-E711-80CB-005056B8439D%7d&pagetype=entityrecord
I can understand that I can get the single record url from the email template, but what if I need all the urls at a time.
Thanks
*This post is locked for comments
To generate the record url for opening the record in default form, you do need ObjectTypeCode and GUID of the record
The URL can be generated as below....... Replace the variable values with your values
On-Premise
https://<domainname>/<orgname>/main.aspx?etc=<objecttypecode>&id=%7b<EntityRecordID>%7d&pagetype=entityrecord
Online
https://<orgname>.crm.dynamics.com/main.aspx?etc=<objecttypecode>&id=%7b<EntityRecordID>%7d&pagetype=entityrecord
I understand, but from the external, how can I have the entityrecordID?
You can use JavaScript:
Please follow this link to obtain the objecttypecode for the entity of current form
//Get the object type code from the entity name
https://community.dynamics.com/crm/f/117/t/189234
==============================================
var orgURL = Xrm.Page.context.getClientUrl();; var recordId = Xrm.Page.data.entity.getId().replace("{", "").replace("}", ""); var entityName = Xrm.Page.data.entity.getEntityName(); //Get the object type code dynamically following the above url var objectTypeCode = 1; //for account entity var recordURL = "https://" + orgURL + "/main.aspx?etc=" + objectTypeCode + "&id=%7b" + recordId + "%7d&pagetype=entityrecord";
Hi,
This is my recommendation for MS CRM 2016:
Thanks man.....this helped me
You can get a Entity Record Url
executionContext.getFormContext().getUrl();
Here is a generalized method to open get entity record url based on Classic or UCI type
https://vjcity.blogspot.com/2020/05/how-to-get-entity-record-url-in-dynamic.html
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
UllrSki 2
ED-30091530-0 1