Search code examples
crmdynamics-crm-4

Pass logged in user in CRM as a parameter to IFRAME


In MS Dynamics CRM 4.0 we have created an extra tab for the salesorder entity in which an IFRAME with a custom, remote PHP page is loaded. Is there any way to find out which CRM user opened the tab with the IFRAME from the PHP file?


Solution

  • You should use postMessage to send the user's information to the IFRAME. This works even if the IFRAME is on an other domain (cross domain). postMessage is supported in:

    • Internet Explorer 8.0+
    • Firefox 3.0+
    • Safari 4.0+
    • Google Chrome 1.0+
    • Opera 9.5+

    Resources: