Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Task Entity ID

Posted on by 50

Hi Everyone,

Probably a really stupid question but I'm having a brain fade at the moment.

If I'm on the task form I can find the id of a task in javascript using

var sGUID = Xrm.Page.data.entity.getId();

But how do I get it if I call the Xrm.WebApi.retrieveMultipleRecords("task", "?$select=xxxxxx") from another entity?

Does anybody know the ID fields name? I need it so I can update things on the task should things change on a custom entity it's linked to like if the owner is changed on the custom entity the owner of all the uncompleted tasks gets changed also.

Thanks

Frosty

*This post is locked for comments

  • Frosty8467 Profile Picture
    Frosty8467 50 on at
    RE: Task Entity ID

    thanks guys I thought that was it but when I tested it I got what I thought was the same GUID but it was only the last 12 characters that were the same. Like I said brain fade.

    Thanks for the help I will use that Rest builder from now on. 

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Task Entity ID

    Hi ,

    I agreed with Aric , it's easy to create Web API  query using rest builder download it and import the solution in your crm instance.

    However ID field name of task is activityid for more details please refer -

    docs.microsoft.com/.../task

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Task Entity ID

    You can use the activityid to get the Guid of the task record:

    ?$select=activityid

    If you are not familiar with CRM Rest Builder, I would recommend that you download it and install it in your environment.

    This will help you with the generation of your api calls. CRM Rest Builder does not have v9 api code generation, but it will still give you the query options that you need. You can download it form here:

    github.com/.../CRMRESTBuilder

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans