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 :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Booking rule - Not working - Help me

(1) ShareShare
ReportReport
Posted on by 25

Hello guys

I have a problem with a booking rule. When a execute the booking rule in a scheduler assistan turn back an error.

 The message:

Invalid data in Booking Rule 'New Bookin rull', method 'BookingInWorkHours'. Rule was skipped
pastedimage1668636863907v1.png
When the same booking rule is executed in schedule board everynthins its ok.
I was program an alert in the fuction, but when the asistan execute the booking rule doesn´t show the hello.
pastedimage1668637013644v2.png
May i Have to do something to run the same function  in the assistand scheduler? 
In the documentatation of microsoft dont say something like that.
Thanks.
I have the same question (0)
  • Las Catalinas Profile Picture
    25 on at

    I write a second function because I think that in schedule assistant need more params but I just use one.

    function BookingInWorkHours(sbContext) {

       debugger;

       alert("Hello");

       var start = sbContext.newValues.StartTime.toISOString();

       var end = sbContext.newValues.EndTime.toISOString();

       return IsAvailable(sbContext.newValues.ResourceId, start, end);

    }

  • Suggested answer
    Thomas David Dayman Profile Picture
    11,323 on at

    I have an example here - www.daymandynamics.com/.../

    But its quite dated now, but it should help you.

  • Las Catalinas Profile Picture
    25 on at

    I appreciate your example. But my problems its when I used de scheduler assistant.

    Booking rule works in schedule board but if a press this button

    pastedimage1669295748077v1.png

    and select a resource and press the button booking  this error is triggered 

    pastedimage1669295856741v2.png

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
11manish Profile Picture

11manish 36

#2
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 32

#3
ManoVerse Profile Picture

ManoVerse 30 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans