Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to retrieve a field's value from another entity in MSCRM 2011?
    primarykey
    data
    text
    <p>I was able to buld such useful <strong>odata</strong> queryies by using <strong>CRMToolsODataQueryDesigner</strong> however I'm stuck how can I get value from a particular field of a form.</p> <p>for instance, I make the next <strong>odata</strong> query</p> <pre><code> http://ServerName/Organization/xrmservices/2011/OrganizationData.svc/AccountSet?$filter=TypeCode/Value eq '121' </code></pre> <p>so, in such way, I found a one note that relates to particular account. The next step, I wonder how can I get a value of a particular field in that account.</p> <p>thanks in advance </p> <p>I tried something like that:</p> <pre><code>var oDataPath = "http:/ServerName/Organization/xrmservices/2011/OrganizationData.svc/AccountSet?$filter=Name eq 'Sample'"; var retrieveRecordsReq = new XMLHttpRequest(); retrieveRecordsReq.open("GET", oDataPath + filter, true); retrieveRecordsReq.setRequestHeader("Accept", "application/json"); retrieveRecordsReq.setRequestHeader("Content-Type", "application/json; charset=utf-8"); retrieveRecordsReq.onreadystatechange = function () { if (this.readyState == 4) { if (this.status == 200) { var retrievedRecords = JSON.parse(retrieveRecordsReq.responseText).d; var vehicle = Xrm.Page.data.entity.attributes.get("new_address1").getValue(); alert(vechicle); } } }; retrieveRecordsReq.send(); </code></pre> <p>The trouble with at this step:</p> <pre><code> "var vehicle = Xrm.Page.data.entity.attributes.get("new_address1").getValue();" </code></pre> <p>here, I'd like to get a value of a particular field</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload