Answered by:
calling onsave event from javascript

Question
-
Hi,
I have created a button in crm form.
And i want to save the form when that particular button is clicked.
Can anyone help me how to call onsave event from javascript when that particular button gets clicked.
Please help me out in doing this.
Thanks in advance.
Friday, September 23, 2011 10:00 AM
Answers
-
I think the following works for CRM4
crmForm.Save();
- Proposed as answer by glosrob Friday, September 23, 2011 12:27 PM
- Marked as answer by Sai Krishna N Sunday, December 4, 2011 4:56 AM
Friday, September 23, 2011 12:20 PM -
Hi,
To call the save event from your javascript code, you can use the javascript functions
crmForm.Save(); and crmForm.SaveAndClose().
There can be other save events as well. There's the 'save and new', 'save as completed', and also the 'send' for emails.
//Save Function: crmForm.Save(); //SaveAndClose Function: crmForm.SaveAndClose(); //SaveAsCompleted Function: crmForm.SaveAsCompleted(); //SaveAndNew Function: crmForm.SubmitCrmForm(5, true, true, false); //Where 5 = Deactivate
- Proposed as answer by Dan Volovyk Friday, September 23, 2011 1:05 PM
- Marked as answer by Sai Krishna N Sunday, December 4, 2011 4:56 AM
Friday, September 23, 2011 1:04 PM
All replies
-
Try the save method; http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_saveFriday, September 23, 2011 10:06 AM
-
Hi,
Thanks for your post.
But i am developing this for CRM 4.0
Friday, September 23, 2011 10:59 AM -
I think the following works for CRM4
crmForm.Save();
- Proposed as answer by glosrob Friday, September 23, 2011 12:27 PM
- Marked as answer by Sai Krishna N Sunday, December 4, 2011 4:56 AM
Friday, September 23, 2011 12:20 PM -
Hi,
To call the save event from your javascript code, you can use the javascript functions
crmForm.Save(); and crmForm.SaveAndClose().
There can be other save events as well. There's the 'save and new', 'save as completed', and also the 'send' for emails.
//Save Function: crmForm.Save(); //SaveAndClose Function: crmForm.SaveAndClose(); //SaveAsCompleted Function: crmForm.SaveAsCompleted(); //SaveAndNew Function: crmForm.SubmitCrmForm(5, true, true, false); //Where 5 = Deactivate
- Proposed as answer by Dan Volovyk Friday, September 23, 2011 1:05 PM
- Marked as answer by Sai Krishna N Sunday, December 4, 2011 4:56 AM
Friday, September 23, 2011 1:04 PM