locked
Construct a url out of a parameter RRS feed

  • Question

  • Hey all, in my Lead entity, I want to share a form url with Telephone2. What I want to do is open a form based on the value of Telephone2. How do I construct the URL?

    I tried: 

    http://myorg.crm.dynamics.com/main.aspx?etn=account&pagetype=entityrecord&telephone2=01125478569812

    But doesn't work.

    Anyone know how?

    Edit: Just to be clear. All I want to do is take an existing telephone number such as: 01125478569812, pass that into a url like:

    http://myorg.crm.dynamics.com/main.aspx?etn=account&pagetype=entityrecord&telephone2=01125478569812 for that form to open.



    • Edited by Sebd.DD Monday, December 15, 2014 12:03 PM
    Monday, December 15, 2014 10:41 AM

All replies

  • Hi,

    Check the below link :-

    http://stackoverflow.com/questions/12281386/how-open-specific-account-record-by-customerid-telephone-no-in-dynamic-crm

    You need to create an HTML web resource and in the query string for the HTML web resource provide the telephone number to identify the account. On the HTML page you could have some onload javascript that calls into the ODATA service and query for accounts based on the criteria you have provided on the query string, then you could build up the URL for the account (since now you have access to the accountId) and redirect from your HTML web resource to the URL for the account.

    Hope This Helps!!!

    Thanks,

    Prasad

    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, December 15, 2014 11:12 AM
  • Sorry, that link will not work in this instance. we are trying to open a form based on a parameter. The links above open a blank form with the field filled in.
    Monday, December 15, 2014 11:19 AM
  • Hi,

    As i have said you need to have an

    HTML Webresource --> On load of form write a javascript-- > Get Query string Value(Telephone no.) -- > Write an Odata query to retrieve the ID of account based on telephone ---> Set the id of account retrieved through Odata in your URL and redirect to that particular Account.

     { You need to create an HTML web resource and in the query string for the HTML web resource provide the telephone number to identify the account. On the HTML page you could have some onload javascript that calls into the ODATA service and query for accounts based on the criteria you have provided on the query string, then you could build up the URL for the account (since now you have access to the accountId) and redirect from your HTML web resource to the URL for the account. }

    Thanks,

    Prasad

    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, December 15, 2014 11:42 AM
  • Hi,

    You can use the extraqs parameter to set the default values in form.

    For ex:

    to set Est. Close Date field for a new opportunity to January 31, 2011, you can use 

    /main.aspx?etn=opportunity&extraqs=estimatedclosedate%3D01%2F31%2F11&pagetype=entityrecord

    In your example, use the below to populate telephone2

    http://myorg.crm.dynamics.com/main.aspx?etn=account&extraqs=telephone2%3D01125478569812&pagetype=entityrecord

    Thanks,
    Seban
    Monday, December 15, 2014 11:46 AM
  • Surely, there is a simpler way?
    Monday, December 15, 2014 12:04 PM
  • Hi, I don't want to populate a new record - I want to search for an existing record and open that.
    Monday, December 15, 2014 12:06 PM