Hi friends,
I have 3 entities country,state and district.
State(child) entity has country(parent) lookup.country has 2 single line fields,i want to display 2 fields in child when country lookup is selected and saved.
next
In district entity I want to display country 2 fields when i select the state lookup.
district has state lookup.
How can we do it using plugin and Javascript??
Thank you!
*This post is locked for comments
Hello Barath,
If my understanding is not wrong ,If you want to display two single line text value for country lookup you can simply modify your lookup view from entity ->View , by adding another text field , so bot the text will display when you select the country.
Just want to know your user will choose two different type single line text value for same lookup? In that case I think it would be good if if you give flexibility to add as a sub grid data or quick view form without writing any code.
Hope this helps.
Hi,
why use code when the default feature can achieve what you wanted. :(
if you insist to use javascript,
call the web api to get the related fields from parent and set it to form.
WebAPi
community.dynamics.com/.../use-fetchxml-to-retrieve-data-from-ms-crm-2016-using-web-api
Set Value
To be honest there is no sense in this requirement but if you insist you can write JavaScript that will retrieve related fields from CRM. To make it easier you can use CRMRestBuilder - github.com/.../2.5.0.0
yes,but my requirement is using plugin or Javascript.
Thank you!
Hello,
Have you considered usage of Quick View Forms?
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6