Answered by:
Custom Form Ribbon Button and Refresh the Entity Form

Question
-
Hi, I have added a custom button to the entity form ribbon which allows to re-open a Task and Appointment entity. But I notice that even though the status is set correctly, but the form does not refresh. I can visually see the status changes only after doing manual refresh/F5.
How can I refresh the form automatically upon button click similar to how it does on 'Activate'/ Deactivate button click on other OOB entities?
Thanks
Friday, October 5, 2012 1:40 AM
Answers
-
Hi
Inside a Java Script Paste the Bellow Code To Refresh The Form Automatically According to Your scenario
System.Windows.Browser.HtmlPage.Window.Eval("window.top.location.reload(true)");
( or)
window.location.reload(true);
Refer Bellow Link
http://social.microsoft.com/Forums/zh/crmdevelopment/thread/1c30f504-3c62-4330-85a9-3d2db665b872
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/1907573b-05a1-4f6a-bdf3-af9d43c2f44a/#10103fa9-d0e3-48fe-9d58-1af7f3e8bb55
- Edited by Parthiban.T Friday, October 5, 2012 4:36 AM
- Proposed as answer by Andreas Buchinger Friday, October 5, 2012 6:10 AM
- Marked as answer by sp22404 Friday, October 5, 2012 6:46 PM
Friday, October 5, 2012 4:26 AM -
I believe that best code would be
window.top.location.reload(true);
- Marked as answer by sp22404 Friday, October 5, 2012 6:46 PM
Friday, October 5, 2012 7:14 AMModerator
All replies
-
Hi
Inside a Java Script Paste the Bellow Code To Refresh The Form Automatically According to Your scenario
System.Windows.Browser.HtmlPage.Window.Eval("window.top.location.reload(true)");
( or)
window.location.reload(true);
Refer Bellow Link
http://social.microsoft.com/Forums/zh/crmdevelopment/thread/1c30f504-3c62-4330-85a9-3d2db665b872
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/1907573b-05a1-4f6a-bdf3-af9d43c2f44a/#10103fa9-d0e3-48fe-9d58-1af7f3e8bb55
- Edited by Parthiban.T Friday, October 5, 2012 4:36 AM
- Proposed as answer by Andreas Buchinger Friday, October 5, 2012 6:10 AM
- Marked as answer by sp22404 Friday, October 5, 2012 6:46 PM
Friday, October 5, 2012 4:26 AM -
I believe that best code would be
window.top.location.reload(true);
- Marked as answer by sp22404 Friday, October 5, 2012 6:46 PM
Friday, October 5, 2012 7:14 AMModerator