Hi everyone,
I have a plugin and the plugin check type field. If type value is equals to 0 or 3, there are two decimal field and they should be not empty. When I update the decimal field to null and there is no update on the type field at the same time, option value is null in plugin. Why is that reason?
Thanks.
Thank you Mahen, it works!
Hi,
In your plugin entity collection you will only get the dirty fields so as user is not doing any changes you won't get the type field.
You need to register a preimage in your plugin where you need to add your type field, and in your code check if the type field is available in the entity collection get it from there (means user updated this field) and it this field is not there get it from the preimage ( it will be always there) so it will be something like below
if (pluginContext.PreEntityImages.Contains("preimage"))
{
preimageobject = pluginContext.PreEntityImages["preimage"];
}
if(yourentityobject.contains("yourtypefieldname")
{
//get type from the entity collection which you are doing currently
}
else if(preimageobject .contains("yourtypefieldname")
{
//get type from the preimage.
}
You can refer this post for how to work with plugin images: carldesouza.com/.../
let me know if you need more details on this.
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... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148