
Hi all,
I have a requirement to place a button in crmForm and onclick event of the Button crmForm data should be saved to DB and then need to redirect to custom page/other related entity.
I have done with placing Button in form and using crmForm.Save() method i am saving form details to DB. To the next line to crmForm.Save() i have used window.location.href and i am redirecting crmForm Url to open other entity details.
Here i am facing issue that form details are not getting saved but the next line code Url redirection is happening fine this is due to the url redirection which i am using next to crmForm.Save().
do anyone can suggest me how to can i check for document.readyState which helps to wait untill crmForm saves the data to DB and reloads the page.
anyone can suggest me how to overcome this issue.
Regards,
Prashanth Y
*This post is locked for comments
I have the same question (0)I have other solution:
1. Update record using webservices - http://technet.microsoft.com/en-us/library/cc677074.aspx
2. Detach close warning using crmForm.detachCloseAlert();
3. Redirect to required page.