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

How to pass form lookup values to custom ribbon button form

(0) ShareShare
ReportReport
Posted on by 483

Hello,

I have created custom ribbon button in opportunity form and launching service activity form for it now i want to pass potential customer field value which is lookup to service activity form and set value on customer field which is also a lookup. Pls suggest how pass lookup values using javascript to form.  

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Try to use following code:

    Xrm.Utility.openEntityForm("serviceappointment", null, {pId: Xrm.Page.getAttribute("parentaccountid").getValue()[0].id, pType: 1, partyid: Xrm.Page.getAttribute("parentaccountid").getValue()[0].id, partytype: 1});

  • dkrishna Profile Picture
    483 on at

    The field on the service activity form is Customers and datatype is PartyList and can you pls suggest how to account value from opportunity to service activity.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Have you tried code I provided?

  • Verified answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    You can set pass values in query string as defined in following thread:

    community.dynamics.com/.../145341

    Hope this helps:)

  • dkrishna Profile Picture
    483 on at

    Thanks preeti.. you are awsome !! iam having exact requirement which iam looking for

  • Preeti Sharma Profile Picture
    2,678 on at

    Thanks:)

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

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans