*This post is locked for comments
*This post is locked for comments
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.
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
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156