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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting the value of object using javascript

(0) ShareShare
ReportReport
Posted on by

Hello dears,

i have used fetchXml to retrieve value of a field from other entity,

in the below code when im trying to retrieve the value of userChannel using  userChannel .getValue() or userChannel.[0].id  im getting  this error  "Object doesn't support property or method 'getValue' at successCallback".

so what i should do to read the value ? Thanks in advance

XrmSvcToolkit.fetch({
fetchXml: fetchXml,
async: false,
successCallback: function (result) {
if (result.entities.length > 0) {

userChannel = result.entities[0].new_channel;

}

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Use the debbuger and set a breakpoint on the line of userChannel. Then you can see of what is consisting your UserChannel.

    Then you can use the correct function to get the desired value.

    Best

  • Verified answer
    ashlega Profile Picture
    34,477 on at

    Hi,

     getValue etc are methods defined in the Xrm library - they are not applicable to the results returned from that fetch call.

     From what I can see, you just need to use

    result.entities[0].new_channel.Id

    or

    result.entities[0].new_channel.Name

    abhishekcrm.blogspot.ca/.../xrmsvctoolkitfetch-examples.html

    But I'd agree with Guillaume - just add a breakpoint and see what's in there (you can also add

    debugger;

    to your javascript to make it stop automatically.. just don't forget to open dev tools using F12)

  • Community Member Profile Picture
    on at

    Thank you so much!!!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans