Notifications
Announcements
No record found.
*This post is locked for comments
Hi Afroz,
You need to elaborate your query to get approprate answer.
Is that your requirement is to call function that sits in your HTML webresource when user saves CRM form? If yes,
You need to create a function in your HTML webresource lets name the function as "SaveRegistrationInfo".
New create a JavaScript webresource with a function "Form_OnSave" and then add this webresource to your registration Form and call "Form_OnSave" function on save of the form.
function Form_OnSave()
{
Xrm.Page.getControl("WebResource_<HTML Webresource name>").getObject().contentWindow.window.SaveRegistrationInfo();
}
Hope this works!
Regards,
Surender Vishwanatham
Hi mate,
If I understand you correctly, you probably want to SAVE the data entered into your HTML form onSave.
Also if the form is re-opened later, you'd want the Form to re-populate with the existing data.
I have applied a similar technique before and I believe the best approach is as follows:
This is high-level:
1. Create a Multi-Line Text Field on your CRM Form (it can be hidden) to store the data
2. Code your HTML form fields so that each <input> field etc calls your function eg. "saveItem()"
This function will need to generate the entire form data (all fields) into a JSON Array
and store it in the Multi-Line Text field above, overwriting anything there already.
3. Setup your HTML to be "dynamic" in that onLoad it reads existing data from the JSON Array and populates the form again.
A quick search surfaced this post from the amazing Paul Nieuwelaar @ Magnetism NZ. He goes into much more detail than me here. Different scenario, but same approach.
http://www.magnetismsolutions.com/blog/paulnieuwelaar/2015/08/25/basic-html-rich-text-editor-for-microsoft-dynamics-crm-2015
Hope this gives you some great ideas.
P.S. I have a solution/app that uses similar techniques but for a Checklist/To-Do List.
You can check it out on AppSource shortly, or www.miiia.com.au/add-ons
Cheers,
Dan
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2