I have a create contact page in a Dynamics 365 portal, and this page needs to call an action in CRM when the new contact record is saved. On the CRM form, I have JavaScript that waits until the contact's id is created and then calls the action. This all occurs in the OnSave JavaScript. In the portal, how can I use JavaScript to get the id of the contact that is being created? Is it possible in the portal?
*This post is locked for comments
Hi,
With portal version 8.4 & above, you can display the custom errors from plugin. The reason we are recommending this becuse its simplae and workf on both CRM & Portals.
Check this out- colinvermander.com/.../dynamics-365-portal-new-release-8-4-0-265-portal-error-logs
Hope this helps.
My action returns values and a status which I need to use in the javascript to display messages to the user. Otherwise I would have used a plugin.
I would have used a plugin, but I need to display various notifications to the user depending on whether or not the action is successful.
Agree with Ravi, Is there any spcific reason why you are using js code for this when this can be done through configuration only,
Hi jimfield,
Is your action returning any values or you are using the response within your JavaScript? If not then you could have done it through workflow which wil work from both CRM as well as Portal.
You could refer the below blog on exeuting the server side code if you can't achiev it through workflow-
uds.systems/.../how-to-run-custom-code-in-dynamics-365-portal
Hope this helps.
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156