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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
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));
        
    }
}
==================================
I have the same question (0)
  • Verified answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Hi partner,
    Could you tell me what app youa re using in D365?
  • 365 financial Profile Picture
    on at
    i mean i want to prevent the user to enter zero or null value in creating new sales order
  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Hi Partner,
    Based on your screenshot, you are using finance&Operation app, you should post it in the following correct forum for better help:
  • 365 financial Profile Picture
    on at
    thank u Leah..
    I solved the problem. 
    i will move the post with the solution to the suggested form
    Thank u very much

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 72 Super User 2026 Season 1

#2
BillurSamdancioglu Profile Picture

BillurSamdancioglu 64 Most Valuable Professional

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans