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)

Struggling with Save event not being fired

(0) ShareShare
ReportReport
Posted on by

Hi!

I have a strange request from my client. When leaving a form in any way they want a couple of fields to be updated even if nothing is changed. 

I in the Save event I can track when it's not Autosave or normal Save button so I ignore those. My solution so far is that I've created a hidden dummy field. In OnLoad I set the value to 1 or 2 depending what's already stored in that field so I get isDirty and Save event will execute. 

It works fine for the first Contact, I leave the form and it saves the values as expected. When I choose another contact, leaves the form it does not trigger Save. However if I hit F5 when I'm viewing the form then leave it will trigger Save event. So it seems to cache stuff from the first trip.

I know it's not the easiest question but can I force my Contact page to not load from cache in any way? Or do you have any other ideas to get around this?

/Magnus 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    SavvyLuke Profile Picture
    655 on at

    Take a look at Hosk's blog regarding changing field programmatically.  Not sure if it might be helpful, but he mentions a method called setSubmitMode that maybe might be useful for your situation.  

  • ashlega Profile Picture
    34,477 on at

    Hi,

     it should not be caching anything between different contact records (would be a total mess otherwise). But, if autosave is active, once you set that field, it'll be auto-saved.. so, when leaving the form, your users won't be asked to save the changes.. not sure if that's the problem here.

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
Liquid error: parsing "/globalsearch/?q=Intel(r" - Not enough )'s.