Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to step through the Connection form?

Posted on by 2,645

I need to step through the onload part of the Connection form, but when I hit F12, I can't get to my script.  Is there another way to do this? 

*This post is locked for comments

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: How to step through the Connection form?

    sorry about that....

  • Suggested answer
    Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: How to step through the Connection form?

    Duplicate thread community.dynamics.com/.../894233

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: How to step through the Connection form?

    Hello,

    I have the below script.  I go to the account and then from there click on connections.  I click on Connection button to load the form, but the debugger never opened up.

    function onloadform()

    {

    debugger;

    if (Xrm.Page.data.entity.attributes.get("record1id").getValue() != null)

    {

    var connectionFrom = Xrm.Page.data.entity.attributes.get("record1id").getValue();

    var fromId = Xrm.Page.data.entity.attributes.get("record1id").getValue()[0].id;

    var FromName = Xrm.Page.data.entity.attributes.get("record1id").getValue()[0].name;

    var fromtype = Xrm.Page.data.entity.attributes.get("record1id").getValue()[0].entityType;

    if (fromtype == "account")

    {

    Xrm.Page.getAttribute("nhs_relatedaccount").setValue(connectionFrom);

    }

    }

    }

    You helped me with the above script and it does work, however, I need to expand on this now and include another entity.  So I have the account, and from there I have Entity B.  The account name is on Entity B.  I need the account name from Entity B to show up in the related account field on the connection form, when the user is trying to create a connection from Entity B.  I can't get it to work though.

  • Verified answer
    Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: How to step through the Connection form?

    Hi,

    Add debugger; in the code which you want to debug. press 12 and let the form load. it will take you to the debugger if your script loads.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans