Sunday, October 16, 2011

MSCRM 2011 Javascript save and close

In 2011 This script doesn't work:
1. Xrm.Page.data.entity.save();
2. window.close();


CRM 4.0 Code (Worked great):
 crmForm.Save();
 window.close();


The solution in 2011:
Xrm.Page.data.entity.save("saveandclose")

The right why in 4.0
crmForm.SaveAndClose();


and just for closing the window
Xrm.Page.ui.close();

2 comments: