Announcements
Hi
I want to change my custom field when we choose product in opportunity . So in my opportunity when I add product and choose 'existing product' from lookup filed , my custom field (hidden) 'date' should be visible .
Can you please help me how I can achieve that , Should I create JS or plugin ?
FYI - I have created plugin already but its not doing anything when I choose existing product .
Thanks
Hemisha
Thank you ! I have used Xrm.WebApi.retrieveRecord and now its working perfectly fine . Thank you so much for help.
Thanks
Hemisha
Hi,
Use below article and copy code to get the lookup value.
Now use xrm.webapi to read custom field from product entity based on lookup guid
Hi
I did try with JS as well but in my logic I need to check about 'product' type . I have one custom field 'is product accommodation product' and if product saved as 'accommodation' then I want to show accommodation dates while I am adding product to opportunity .
I can make change on 'onchange' event of 'product' but I don't know how I can get product's custom field value in js and add condition according to it .
Can you please help to write this logic ?
Thanks
Hemisha
Hi,
With plugin Date field will be populated when you click save.
If you want to see the result as soon as you select lookup then you will need to write javascript code
Hi HGajjar ,
As you need to make the date column visible. It must need to write JS. The trigger must be On Change of Product.
If I answer your question then please mark it as verified.
Let me know if I can provide you with more details.
Thanks
Regards,
Abdul Wahab
Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: www.linkedin.com/.../
I made it 'create' but still nothing happening .
Hi,
As I mentioned earlier you should specify Create in Message instead of Update.
Hi This my quick form inside Opportunity form. Now when I choose 'Existing Products' depend on product type my 'Accommodation StartDate' should trigger.
and below is register plugin
Thanks
Hemisha
Hi,
Can you please share your code?
Also plugin step configuration screenshot.
I think it message should be create and not update . Update also if you are updating existing associated product
Yes I have registered my plugin on opportunityproduct on Update (message).
André Arnaud de Cal...
293,425
Super User 2025 Season 1
Martin Dráb
232,557
Most Valuable Professional
nmaenpaa
101,158
Moderator