Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Form Onsave func run more than once when i close opportunity

Posted on by 65

1. Click [close as won] on opportunity form. 

2.ScriptA  setFlgFunc :  Set bRunflag = 1 when [close as won] is clicked.

3.ScriptA exeOnSave :  if bRunflag = 1 then return. else Set updateFlg = (updateFlg + 1 ) %100.

4.PluginA is run when oppo.statecode be changed :

                    if (m_enPreImgOP.new_updateFlg== "1000")
                    {
                        m_enOp.new_updateFlg= "2000";

                    }
                    else
                    {
                        m_enOp.new_updateFlg= "1000";
                    }

5.PluginA tracelog is show updateFlg has be update to 1000.

6.oppo record is updated as "won" and updateFlg field's value is updated as 1 in form.

question: onsave ScriptA seems run after oppo won, does anyone have the same issue like me?

there are Plugins will run at updateflg is updated, they are run twice ......  

ps: it is not happen 100% ,  i' ve try 30 times it has happened once.

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans