Solved

Form Scripting: How to I access a lookup Value

Posted on 2010-11-15
2
606 Views
Last Modified: 2012-05-10
I like to use a value of a lookup list for calculation in a Form Script.

I had a picklist and I could access the value of the picklist:

var priority
priority = crmForm.all.prioritycode.DataValue

I have now replaced the picklist with a lookup field. It contains two attributes NAME & DURATION. I use the NAME attribute to populate the Form Control.  But now I like to get the value of the DURATION attribute to do some calculation with.  

How do I do this?
0
Comment
Question by:juttaReimann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Feridun Kadir earned 500 total points
ID: 34140867
What entity is the lookup field connecting to?

Is duration a field on the other entity?  If so, then you can't get at the value of it directly using javascript. You can only directly get values of fields that are explicitly shown on the form. If you want to get the value of another attribute in a connected record(i.e. via a lookup) then you will need to call the CRM web services in the javascript to query for the attribute that you are interested in on the connected record. The CRM SDK has a section on using web services in javascript (or jscript as Microsoft refers to it).

0
 

Author Closing Comment

by:juttaReimann
ID: 34144007
Thanks for pointing me in the right direction.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question