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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

How to auto populate lookup value in a form using Xrm.Navigation.navigateTo

(0) ShareShare
ReportReport
Posted on by 5
I am using below function on click of a button. I need to auto populate related project name in field. Display Name of field is Project and Name of the field is "abc_project". What should I pass in query string (data)?
OpenNewRequestPopup = () => {
    let qs = "_abc_project_value={11111111-1111-1111-1111-111111111111}"
    var pageInput = {
      pageType: "entityrecord",
      entityName: "abc_resourcerequest",
      data: encodeURIComponent(qs),
    }

    var navigationOptions = {
      target: 2,
      width: { value: 50unit: "%" },
      position: 1,
    }
    console.log(pageInput)
    Xrm.Navigation.navigateTo(pageInputnavigationOptions).then(
      function success() {},
      function error() {}
    )
  }
I have the same question (0)
  • Suggested answer
    Carlo Velasco Profile Picture
    787 on at
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Try to use following code:

    var pageInput = {

    pageType: "entityrecord",

    entityName: "abc_resourcerequest",

    data: {

    abc_project: "11111111-1111-1111-1111-111111111111"

    }

    };

    var navigationOptions = {

    target: 2,

    width: { value: 50, unit: "%" },

    position: 1

    };

    console.log(pageInput);

    Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(

    function success() {},

    function error() {});

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 60 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 51

#3
Satyam Prakash Profile Picture

Satyam Prakash 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans