Skip to main content

Notifications

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

Populate Lookup Entity Text field using workflow or Javascript

Posted on by 2,416
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,179 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,179 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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans