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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to step through the Connection form?

(0) ShareShare
ReportReport
Posted on by 26

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

I have the same question (0)
  • Verified answer
    Sreevalli Profile Picture
    3,256 on at

    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.

  • USA80 Profile Picture
    26 on at

    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.

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

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

  • USA80 Profile Picture
    26 on at

    sorry about that....

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans