Recalculate and SubmitCrmForm JavaScript function in CRM


I was trying to figure out what the recalcuate button does in case of Order and Quote form. Got to know that it calculates the total based on the Products added to that record. Behind the scene this is the html code for the recalculate button

<li tabIndex=”-1″ title=”Recalculate” id=”_MBcrmFormSubmitCrmForm1truetruefalse”
action=”crmForm.SubmitCrmForm(1, true, true, false);”>

So basically it calls SubmitCrmForm function.

SubmitCrmForm triggers the save event even if there are no modifications made on the form.

SubmitCRMForm( Mode, Validate, ForceSubmit, closeWindow)        // we could use this function but it is unsupported

Different Mode could be -1,2,7,58,59

or alternatively we could use the below function

Code: 1
Function: crmForm.Save();

Code: 2
Function: crmForm.SaveAndClose();

Code: 7
Function: send();

Code: 58
Function: SaveAsCompleted();

Code: 59
Function: crmForm.SubmitCrmForm(59, true, true, false);



Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Recalculate and SubmitCrmForm JavaScript function in CRM”

  1. Do you know of any way we can suppres the save event – specific example is when creating a new quote – a save event takes place behind the scenes. This is breaking my quote code as I am doing a count on the number of quotes per opportunity… People are creating quotes in error .. not clicking save – but the record is being saved nevertheless… Any ideas?


Please share your thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.