We are on CRM 2016 on-prem. I'm building an SSRS report to show all phone call & task activities. For each activity, I have a hyperlink to navigate to the record. I need to give the users the link to the Regarding record of that activity as well. The syntax for the navigation link requires the logical name for the entity (=Parameters!CRM_URL.Value & "?ID={"&Fields!regardingobjectid.ToString()&"}&LogicalName=opportunity"). I could hard code the logical names based off of the objecttypecode in the sql query but there are too many entities to account for, the objecttypecodes differ from environment to environment, we would have to update this list as we create new entities, and not to mention that hard coding is just a horrible idea.
In order to grab the logical names dynamically, I was trying to use the lookup function in SSRS to lookup the name from another dataset using the EntityView view, but this didn't work. We tried to create a "filtered" view in another database and use the lookup function but that didn't work either.
(=Parameters!CRM_URL.Value & "?ID={" & Fields!regardingobjectid.Value.ToString() &"}&LogicalName=" & Lookup(Fields!regardingobjecttypecode.Value, Fields!ObjectTypeCode.Value, Fields!Name.Value, "DataSet1"))
I wanted to see if anyone had any ideas on how to get the entity logical names dynamically in order to populate the name into the syntax.
Thanks in advance,
Chrys
*This post is locked for comments
I have the same question (0)