web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

How to update lookup

(0) ShareShare
ReportReport
Posted on by 45

In quote product form i have 2 lookup field called Product family(PF entity lookup) & AIC/Presales Person(user lookup) I just want to update presales person field when product family contains data.product family(entity) in that there is user lookip field called presales owner.See my 1st below screenshots in that product family record user is Hossam the same user i have to update in quote product field called AIC/Presales Person.See my 2nd screenshots.Both the fields are available in quote product.

1st screenshot2nd screenshot

I have the same question (0)
  • Guido Preite Profile Picture
    54,086 Moderator on at

    if you need a "real-time" effect (meaning that after you select the product family the person lookup is filled right away) you will need a javascript function.

    if it's enough to fill the data after the record is saved, you can use a classic workflow (you will be able to find the "Pre-Sales Owner" field and set to the "AIC/Sales Person" field) of course both fields need to point to the same entity.

    hope it helps

  • irfanshaikh786 Profile Picture
    45 on at

    workflow will not help me in this case

  • irfanshaikh786 Profile Picture
    45 on at

    function OnLoad(context) {

    console.log("On Load");

    // First get the OwnerId lookup

    var OwnerId = FormContext.getAttribute("abn_presalesowner").getValue();

    var Id = OwnerId[0].id;

    var Name = OwnerId[0].name;

    var EntityType = OwnerId[0].entityType;

    // Create new lookup array

    var lookup = [];

    lookup[0] = {};

    lookup[0].id = Id;

    lookup[0].entityType = EntityType;

    lookup[0].name = Name;

    // Get and Set New Lookup

    var MySystemUserField = FormContext.getAttribute("abn_aicpresalesperson");

    MySystemUserField.setValue(lookup);

    }

    created script but its not working

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 85 Super User 2026 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#3
11manish Profile Picture

11manish 64

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans