Hi
I have two forms for an entity, I want to get form names in a plugin, how do I do that? Any help would be great. Thanks
*This post is locked for comments
Hi
I have two forms for an entity, I want to get form names in a plugin, how do I do that? Any help would be great. Thanks
*This post is locked for comments
For more specific I would say you can create a optionset field with different options with each form names . Add the optionset field in the forms and make it hidden. Now create business rules for each form (Scope = forms) and set the optionset value for respective forms. From plugin you can get the optionset text as a form name.
A Plugin receives a server side message, as far as I know there is no way to know the form that submitted the event you want to catch with a plugin.
However I can think of a workaround, if in a specific form you put an hidden field and inside the onsave event you set this field with the setsubmitmode always, inside the plugin you can check if the target contains this field and its value, with this information you can know the form that triggered the message.
hope it helps
André Arnaud de Cal...
292,494
Super User 2025 Season 1
Martin Dráb
231,305
Most Valuable Professional
nmaenpaa
101,156