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 :
Microsoft Dynamics CRM (Archived)

Retrieve Data

(0) ShareShare
ReportReport
Posted on by

22418.Capture.PNG

Hello Guys,

can anyone please share input on the following: -

As soon as I get the account name which is a look up, Pal gets automatically filled in. I want office also to get automatically filled in, can anyone help me please?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    Create  business rules like below -

    IF Account Name Contains Data

    Then

    Set Field Value

    3580.BUR.png

    If you find any limitation on business rules to set the value then write JS function where set the value  and register it  in onload and onchagne event of the Account Name field..

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Suchi,

    As your requirement, it seems you are retrieving office name of the selected AccountName lookup.

    You need to write JS onchange of AccountName Lookup.

    Thank you

    Pankaj Kumar

    If found useful, please mark the answer as verified

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi SuchiSuchi,

    You need to share some more details about your setup. There is no oob field called Pal/ office. Based on your description, you can add the logic same as your Pal field for office.

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    Verify the form scripts, there will be some service calls on change of Account lookup in js to populate the existing PAL# field, just extend the same method to pull extra column office as well & populate it.

    Pro tip: you don’t need to do this to store redundant data. Since after storing these fields here, if Account data changed it will not flow here. Best option is Quick view form to show it. Basically CRM platform will query & show lookup record values in similar way. Just you have to design the Account QV form & embed in referred entity form.

  • Community Member Profile Picture
    on at

    Hi Ravi,

    These 2 fields Pal and office are look up. however account name has details of pal and office. when account name is selected, pal sits in the pal field, now I want office to be placed in office field. Can you please help me on that.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    How are you currently setting the pal lookup from account?

  • Community Member Profile Picture
    on at

    Can you tell me how to find out the source code, that we used to call in dotnet for CRM. Am sure there can be JS or pluggin that takes the information from account name and places in pal# If you tell me that, I think, I can solve the problem.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    So basically this can be achieved by

    1) JS using the WEB API - So you need to check if there is any JS wrtten on change or on save.

    2) Workflow - You need to check if there are any workflows running for this entity on create/ update

    3) Plugin - You need to check if there are any steps registered for this entity on create/ update

    Hope this helps.

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hello,

    You can write a Web API request where you can pass account id and it can return you required field, you can design your web api request using rest builder: github.com/.../releases

    further you can set lookup like below

    var object = new Array();

               object[0] = new Object();

               object[0].id = result.fieldname.id;

               object[0].name = result.fieldname.name;

               object[0].entityType = "entityname";

               Xrm.Page.getAttribute("fieldname").setValue(object);

    You can refer my sample if you are working with Dynamics 365 V> 9.0

    http://himbap.com/blog/?p=2874

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans