Hello everyone,
I have two fields in my table
1. Reason - text
2. ReasonCode - optionSet
I have written plugin which will trigger on record creation, I want to set value for Reasoncode based on the value in Reason field.
I have around 35 options in the Reasoncode. Is there any other way I can do this rather than using 35 if or case conditions?
Thank you...
Hello @Amruthavarshini,
As per your scenario, we need to use if..else or Switch Case to achive this Scinatio in PreCreate Operation there is no other way.
My Suggestion will be, if we are having with in 10 values its good to go with Optionset Value else its good to go with Lookup(by creating custom table)
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
Hello @Amruthavarshini,
If you are looking for a course to learn more about Plugins and JavaScript do check out this website. Dynamics Labs
Regards
shi012
User | Count |
---|---|
19 | |
15 | |
14 | |
10 | |
8 |
User | Count |
---|---|
40 | |
30 | |
22 | |
22 | |
16 |