Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to update a checkbox in the field and display the checkbox tick to a particular field

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I have created a field in the Form and the field is a check box.!

i am working on master planing and in that i need to add a custom field showing safety stock, so i have added a checkbox field in the form  now i want only the checkbox ticked when the safety stock is available and if its not available i want the check box anticked so how do i proceed ahead now as i am not understanding how to move forward....

Thanks in Advance;

Josiah 

  • Josiah12 Profile Picture
    Josiah12 5 on at
    RE: How to update a checkbox in the field and display the checkbox tick to a particular field

    Can You help me with the code.!

    I tried but it isnt working it shows it is been prematurely terminated.

  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: How to update a checkbox in the field and display the checkbox tick to a particular field

    I can accept calculating the value of the field in the init of the form, but if it is critical information that can change while the form is open, I suggest you write a display method.(As I understand it, you want an informational field that the user cannot change. So You don't need a field)

  • Suggested answer
    greengrimms Profile Picture
    greengrimms 1,400 on at
    RE: How to update a checkbox in the field and display the checkbox tick to a particular field

    Hi Josiah,

    First step would be to add an extension class for your business logic:

    docs.microsoft.com/.../method-wrapping-coc

    Once you do that, add the logic to enable/disable the checkbox:

    yourTable.yourField = NoYes::Yes //for checking the checkbox
    yourTable.yourField = NoYes::No //for un-checking the checkbox

    What will trigger your code will depend on the business scenario that you're planning to run. If you want to do it as soon as the form is opened, go with the Initialized Event Handler from the datasource.

    Hope that helps.

    Regards

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

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans