Handle Cancel and Save URL

By | May 8, 2009

Have you ever tried using communications against your custom entity?? If yes, then the main hedache that you all might have faced is the desruption of the Save and Cancel buttons URL. You might have faced the problems like CRM logs you out after clicking cancel button or either throughs you in any other context on clicking save button.

Well, the reason behind this is the URL appending nwanted key values. To resolve this, you may need to check and compare the URL of Communication screen when you go from the Custom entity and from MY CRM. You will notice “&Key-1=58” included in the URL when you come from your custom entity, but when you come from MY CRM you will not find “&Key-1=58” in the Communication URL.

Now what you need to do is, on Onload event find “&Key-1=58” in the URL and replace it with blank then set the new URL to communication using below script.

document.location.href = StrnewURL;

If you find this useful, Please drop us a mail on crm@greytrix.com.