web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to select multiple checkbox on form grid line data source in D365FO

(0) ShareShare
ReportReport
Posted on by 632

Dear Friends,

My requirement is if user will select multiple check box form line data source and he click on 'Create invoice proposal' button then some error will come and user unable to create 'project invoice proposal'.

Back end Form name is 'PSARetentionRelease'

Thanks & Regards

Rahul.

I have the same question (0)
  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    you may want to explore framework events on data source and selection control

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    Can you provide more info about your error ? What error you are getting ?

  • Rahul.p Profile Picture
    632 on at

    My requirement is if user will select one line from line data source and click on 'Create invoice proposal' button then he can able to create invoice proposal and no error will come, it is working fine.

    But if user will select multiple line from line data source and click on 'Create invoice proposal' button then  some error should come (Exp: Multiple line can not be select) and user unable to create invoice proposal.

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    How are the checkboxes implemented? If it's a standard form, tell us its name and we can review the implementation by yourselves.

  • Rahul.p Profile Picture
    632 on at

    Yes it is standard form
    Front End info:
    Project management and accounting ->Projects ->All projects

    Back end info:

    Form name: PSARetentionRelease

    3175.Capture2.PNG

  • Verified answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    You're just one step from finding the answer to my question. Open properties of the form control and you'll see it's bound to the Selected field of PSATmpRetentionReleaseTable data source. In the case of lines, it's the Selected field of PSATmpRetentionReleaseLine data source.

    Therefore when you want to validate the data, you'll simply write queries against the data in temporary tables.

    For example, if you want to know how many lines are selected, you can do this:

    select count(RecId) from psaTmpRetentionReleaseLine
    	where psaTmpRetentionReleaseLine.Selected;

  • Rahul.p Profile Picture
    632 on at

    Dear Martin,

    Thank you for your kind support.

    Please tell me where and in which method i can write the above logic.

  • Suggested answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Hmm, all right, let me do a few more steps for you.

    You said you want to do it when pressing the button, therefore your next step is finding out what the button does. Find the button (CreateInvoiceProposal) and look at its type. I could be a menu item button and then you would check which object does the menu item point to. But in this case, is just a regular button and therefore expand its methods and open clicked method.

    You'll see it calling psaRetenetionRelease object, therefore your logic should go there.

    Open the class (PSARetenetionRelease) and explore its implementation. You may notice that it extends ProjInvoiceChoose, which has validate() method and that sounds like the right place for validations.

    validate() is actually a framework method - ProjInvoiceChoose extends RunBaseBatch and validate() is a method of the RunBase framework.

    This is the kind of things you must do when finding the right place for your logic.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans