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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

JavaScript: Stop crm contact onload event on activity close

(0) ShareShare
ReportReport
Posted on by

I have a contact form onload event that triggers a custom activity to open Using

Xrm.Utility.openEntityForm("customactivity", null, parameters);
}

  However when user marks the activity as complete or closes the activity form, this closes the custom activity and focus return to the open contact form. the problem is that the form load event fires again as the contact form reloads. I want to stop the contact form load event from firing again once the activity closes.  I don't want to use a button and also I want the contact onload to always Fire when I open the contact records but not when I close the activity opened by that contact.

Scenario

open a contact

This  then fires onload events with some parameters as well as 

Xrm.Utility.openEntityForm("customactivity", null, parameters);
}
User then works on the opened activity
on marking activity as complete or closed
How do I stop the contact form from firing the onload event again once the activity is closed or completed to stop the activity from poping up again.
i only want activity form to pop up when the record is opened not when it reloads
 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nuno Profile Picture
    2,005 on at
    RE: JavaScript: Stop crm contact onload event on activity close

    Xrm.Utility.openEntityForm opens the record page in the same window. Try to open the entity form in a new window instead:

    mscrmmindfire.wordpress.com/.../crm-2013-open-entity-form-in-new-window-by-javascript

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans