Please, don't hard code

When building hyperlinks to CRM in SSRS reports, please don’t hard code

  • Wrong: hard coding your CRM URL. Do not set your URL to “https://crmserver/….” If you do this use the hyperlink will only work in one environment and will have to be rewritten to work in another environment.
  • Right: Use the CRM_URL parameter in your report. This makes your links will work in all environments, even when offline.
    Parameters!CRM_URL
  • Wrong: Using OTC (ObjectTypeCode) in your hyperlink expression. ObjectTypeCode never changes for System entities, but for custom entity ObjectTypeCode will change when customization is imported into a new environment.
    ="OTC=1&ID={“ & Fields!accountid.Value.ToString() & ”}”
  • Right: Use the logical entity name instead of ObjectTypeCode.
    ="LogicalName=account&ID={“ & Fields!accountid.Value.ToString() & ”}”