Notifications
Announcements
No record found.
Hi all,
Is there any event in dynamic CRM for identifying form is closed/form is changed/switched to new form ?
Thanks
Arun
*This post is locked for comments
Hi Arun,
Check this
msdynamicscrmblog.wordpress.com/.../get-form-types-and-modes-in-dynamics-crm-2013
msdn.microsoft.com/.../gg327828.aspx
Hello Arun,
There is no easy way to identify that form is closed. Just curious - why do you need it?
We have "getFormType()" method to get the form context of the record.
Syntax :
Xrm.Page.ui.getFormType();
You can refer "msdn.microsoft.com/.../gg327828.aspx;.
I need to update one field in another entity when form is closed/ away from form. As we building Time tracking Project where we have to work with incident. I am creating a new record when we open the incident with start date and want to update the end date time when form is closed/ we leave the form. Do you have any better idea?
Can you explain the problem you are facing with an appropriate example ? If possible please provide an example.
As per my knowledge we cant identify whether the form is being closed or not in CRM. Workaround for this is that you can update the end date time when user hits "save&close" button to close the form.
getSaveMode(), returns a value indicating how the save event was initiated by the user.
Below is the sample code :
function preventAutoSave(econtext) { var eventArgs = econtext.getEventArgs(); if (eventArgs.getSaveMode() == 2 ) //when save&close button is clicked
{ //update end date time code here. }}
Please mark it as answered if you find it to be hellpful.
Thank You.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2