web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamic URL doesn't work

(0) ShareShare
ReportReport
Posted on by

Hi all, 

I want to open an URL from an entity form with JavaScript. In this form i have two attributes "mrd_telefon" and "mrd_name", the values have to be send to a nother entity wich i want to open in a new window with the given values from the two attributes. The target attributes are "phonenumber" and "to". 

Here is my code: 

var RnNum = Math.floor(100000000 + Math.random() * 900000000);

var serverUrl = "mrd-custom.api.crm4.dynamics.com/main.aspx;extraqs=";

var extRaqs = "&phonenumber=" + Xrm.Page.getAttribute("mrd_telefon").getValue();

extRaqs += "&to=" + Xrm.Page.getAttribute("mrd_name").getValue();

var url = serverUrl + encodeURIComponent(extRaqs) + "&histKey=" + RnNum.toString() + "&newWindow=true&pagetype=entityrecord";

function openNewPhoneCall(){

debugger;

window.open(url);

}

The function is on Load. I get no administrable error message just a simple error. 

The result is the following URL: mrd-custom.api.crm4.dynamics.com/main.aspx;extraqs=%26phonenumber%3D0843164991278%26to%3Dtest_neu&histKey=334057691&newWindow=true&pagetype=entityrecord#847925429

Pleas tell me where is my mistake. 

Thank you very much guys! 

*This post is locked for comments

I have the same question (0)
  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    You need to use the method Xrm.Utility.openEntityForm or Xrm.Utility.openQuickCreate

    Refer this

    msdn.microsoft.com/.../jj602956.aspx

    Hope this helps

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at

    Hi,

    User Xrm.Utility.openEntityForm and on form load event, fetch data from referenced entity and perform action what ever you want to do. Or use parameters like this article.

    crmfortress.com/.../xrm-utility-openentityform-with-parameters

    Thanks,

    Sandeep

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans