Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Populate Lookup Entity Text field using workflow or Javascript

(1) ShareShare
ReportReport
Posted on by 2,558
Hi Guys
I have the following example scenario to illustrate the requirement. On sales order a new lookup field is created for countries. Countries entity contain guid (PK), code (AU,NZ) and Description (Australia). Now when I create the relationship as expected I can select a country in order form. My requirement is to populate a custom field on the order with the country code instead of guid. I know how to do this via Javascript. Can the same be achieved via workflow when saving the record (only required after saving for integration to another system). Related question is what are pros and cons of using:
1. Javascript
2.Workflow (classic not PA)
3. plugin
 
The problem I have with plugins is its complicated when using "update" event as a user may update the country selection after the initial insert. 
My biggest problem with JS is code maintenance , its all over the place and I cannot easily see everything in VS code or VS like plugin. I wonder how people manage JS code without loosing track. Classic workflow i havent played around much but some talk of MS deprecating. I dont like PA no code stuff as its hard understand after adding 10-20 steps unlike C# programming plus licensing is an issue when working with clients. 
  • Verified answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 10,089 Super User 2025 Season 1 on at
    Populate Lookup Entity Text field using workflow or Javascript
    Please let me know if you need any help.
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 10,089 Super User 2025 Season 1 on at
    Populate Lookup Entity Text field using workflow or Javascript
    You can use workflow without any issue. You have also mentioned about the integration, what is It related with this requirement?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,234 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans