Solved

Form Scripting: How to I access a lookup Value

Posted on 2010-11-15
2
590 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
2 Comments
 
LVL 29

Accepted Solution

by:
feridun 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now