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,469
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 8,699 Super User 2024 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 8,699 Super User 2024 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans