Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Field Service forum / Requirement Id is not ...
Field Service forum

Requirement Id is not available in booking rule through WO book button

Posted on by

When scheduling a WO (selecting a WO and click on Book button), the booking rule is fired but sbContext.newValues.ResourceRequirement is NULL. When moving the scheduled meeting (from the same view), sbContext.newValues.ResourceRequirement has an ID.

Do you know about this issue ?

Thanks for the help

  • Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Requirement Id is not available in booking rule through WO book button

    Thanks. I'm not sure that I can give you a solution as it looks like the OnPremise and Online version may be different.

  • RE: Requirement Id is not available in booking rule through WO book button

    Thanks, here is the way:

    book2.png

    book2.png

  • Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Requirement Id is not available in booking rule through WO book button

    Very odd. Is it possible you can send some screenshots on how you are booking the work order to get the NULL ResourceRequirement so I can be sure we are doing it the same way.

  • RE: Requirement Id is not available in booking rule through WO book button

    I forgot to mention that CRM version (on-prem) is 8.2.2.112 and Field Service 6.2.0.342.

    I noticed that I don't have ResourceRequirementId in sbContext.newValues (it is ResourceRequirement).

    sbContext.png

    Here I just console log the sbContext and the value is NULL.

  • Suggested answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Requirement Id is not available in booking rule through WO book button

    OK I realised that pressing the book button brings back the sbContext.newValues.ResourceRequirement with curly brackets. What I would suggest is to do this with the value

    sbContext.newValues.ResourceRequirementId.replace(/[{}]/g, "");


  • Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Requirement Id is not available in booking rule through WO book button

    Hi Julien,

    I only tried doing this from the schedule board but I never tried doing it the other way. I am also getting this error.

    I will try and see if there is a way of getting the ResourceRequirementId but if not the best thing to do is do a check in the JavaScript so that it doesn't error

    if (sbContext.newValues.ResourceRequirement != null)
    
    {
    
    }

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans