Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Field Service forum / Booking Setup - Auto G...
Field Service forum
Suggested answer

Booking Setup - Auto Generate Booking default to 'No'

Posted on by 95
We don't want to use the Auto generate booking on the Agreement Booking Setup, so would like to default this to 'No' when creating a new Agreement Booking Setup.
I've changed the default option to 'No' on the table column in PowerApps, however, it still stays as 'Yes' on the form within FS.
 
Is there an issue with changing the default option on this field, as no matter how I try to do it, I can't seem to set the default option to 'No'.
 
Any ideas?
 
Categories:
  • Suggested answer
    Booking Setup - Auto Generate Booking default to 'No'
    Hello @barryjarvis,  I would suggest creating a business rule for this. 
     
    Go to >>Tables>>Look for "Agreement Booking Setup">>Business Rules. 
     
     
    Use an existing field value for the new business rule, see below
     
     
     
    Note: I see some code out of the box that may be overriding the Default No. 
     
    Always Happy to Help!
    Tony Hurtado
     
     
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Booking Setup - Auto Generate Booking default to 'No'
    Hi,
     
    I encountered the same issue as you in my testing.
    You can use JavaScript to set the Auto generate Booking field to No the first time you save or every time you open the Agreement Booking Setup form.
     
    function onload(executionContext){
        var formContext = executionContext.getFormContext();
     
        //get the Auto Generate Booking field
        var Auto_Generate_Booking = formContext.getAttribute("msdyn_autogeneratebooking");
     
        // set the Auto Generate Booking field to No
        Auto_Generate_Booking.setValue(false);
    }
     
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,135 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans