Hi All,
How to close the form and remove data from the fields if there was any entered. The user will be taken back to step 2 using jscript. Thanks in advance.
Hi Subudeep,
We need more information to answer your question fully.
Hi,
Here is the document for Client Scripting in Dynamics 365.
docs.microsoft.com/.../reference
You can refer this to achieve JScript changes. For specifically closing the form, you can use this:
docs.microsoft.com/.../close
Hope this helps.
Hi partner,
1. If you want to close a form with js code, you could use this function:
formContext.close();
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui/close
2. If you want to clear the fields, you could use this js code:
Xrm.Page.getAttribute("name").setValue(null);
http://dynamicslmp.com/2017/12/02/get-or-set-field-value-using-javascript/
Hope it helps.
Best Regards
Leo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.