Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

CRM USD issue: closed event happens before variable is updated

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

This error happens when a new form is opened.

I created a new Windows Navigation Rule that opens the parent account of the conttact in the onload event of the contact.

The forms of the contact and the account are opened well but in the left top panel lost the information of the contact, i have:

Contact Name: [[contact.fullname]x]

Before the account form is opened the information of the contact is ok.

Could you help me ?

Thnak you

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CRM USD issue: closed event happens before variable is updated

    Great Srikanth !!!

    This has solved the problem. Thank you very much for your help.

    Best regards

    Massimo

  • Verified answer
    ansrikanth Profile Picture
    ansrikanth 3,115 on at
    RE: CRM USD issue: closed event happens before variable is updated

    Right, I'm able to repro it..

    I guess, that is one configuration mistake in default configurations created by MS. If you see, on browser document completed event of Account, they have created 2 action calls a) search: associated contacts b)search: current account. both of these action calls have different purpose when the session is of account session.

    In our case it is not really an account session rather it is contact session.

    So, 2 options for you.. a) Either get rid of these 2 action calls permanently b)Or make sure the condition of these 2 action calls will fail for ever or at least for contact session they fail.

    for ex: in my case, I don't need these 2 action calls but I don't even want to delete the 2 action calls. Henceforth, I have placed some dummy condition 1==2, so that it will fail every time. Hope you got the point.

    771404.Capture.PNG

    Now, I can see the contact name properly when I open the account from Contact page.

    All the best !!

    Srikanth

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CRM USD issue: closed event happens before variable is updated

    HI Srikanth,

    no Javascript. I'm using the "Window Navigation Rule" of Unified Service Desk. You can see in the following image

    USD02.jpg

    You can see the situation of USD before opening the account 

    USD02.jpg

    And after the click on Parent account (see the top left panel)

    USD03.jpg

    Thank you

  • Suggested answer
    ansrikanth Profile Picture
    ansrikanth 3,115 on at
    RE: CRM USD issue: closed event happens before variable is updated

    How are you opening the parent account on load of contact ? Are you using the javascript to open with window.open ? or Are you using any USDs RunXrmCommand/RunJavascript action to open the account ? If it is later, then you should open it after load complete.

    Please explain how are you opening the account form.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CRM USD issue: closed event happens before variable is updated

    Hi Yadnyesh

    thank you for the reply.

    ,

    I dont' understand where I have to put the code.

    To open the account I used a "Window Navigation Rule" in the Unified Service Desk configuration. I also modified the rule to start only when I click to the lookup but with the same result also, if i save the contact before.

    The error is the same. Before to click, the contact name has the right full name, after the click and form of account openend i have Contact Name: [[contact.fullname]x]

    Thank you

  • Suggested answer
    Yadnyesh Kuvalekar Profile Picture
    Yadnyesh Kuvalekar 4,102 on at
    RE: CRM USD issue: closed event happens before variable is updated

    Hi,

    Put below line before the code you have to navigate to parent account.

    Xrm.Page.data.save()

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans