Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How can i get the value of cell grid?

(0) ShareShare
ReportReport
Posted on by
Hello all...
I want to prevent the user to enter zero or null value in the SalesPrice field of the LineGrid of SalesTable
so i extended the form of SalesTable and copyied the On Validating event handler to a new class but I do not know how can I get the value the SalesPrice field to check if it is zero or not.
=================================
class SalesTableSalesLineHandler
{
    /// <summary>
    ///
    /// </summary>
    /// <param name=/sender/></param>
    /// <param name=/e/></param>
    [FormControlEventHandler(formControlStr(SalesTable, SalesLine_SalesPrice), FormControlEventType::Validating)]
    public static void SalesLine_SalesPrice_OnValidating(FormControl sender, FormControlEventArgs e)
    {
        
        FormRun formRun = sender.formRun();
        FormDataSource salesTable_DS = formRun.dataSource(FormDataSourceStr(SalesTable,SalesLine));
        FormGridControl formGridControl = formRun.design().controlName(formControlStr(SalesTable,SalesLineGrid));
        
    }
}
==================================
  • How can i get the value of cell grid?
    thank u Leah..
    I solved the problem. 
    i will move the post with the solution to the suggested form
    Thank u very much
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    How can i get the value of cell grid?
    Hi Partner,
    Based on your screenshot, you are using finance&Operation app, you should post it in the following correct forum for better help:
  • How can i get the value of cell grid?
    i mean i want to prevent the user to enter zero or null value in creating new sales order
  • Verified answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    How can i get the value of cell grid?
    Hi partner,
    Could you tell me what app youa re using in D365?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans