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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

EP Ok button behavior (modal window)

(0) ShareShare
ReportReport
Posted on by 737

Hi, All.

At EP AX2012 I have modal window with “Save and close” buttons (at the left top corner (let’s say “TopOk”) and at the right bottom corner(let’s say “BottomOk”)) that are created with property “AutoGenerateEditButton” = true on the form.

The problem is the following: there are two different behavior of the form whether the user clicks TopOk or BottomOk (I expected that they will be working the same, but not). The BottomOk works correct (as expected). And when I press TopOk there are some validations that I couldn’t catch.

Validation could be caused by the following: I have added a AxMultiSection, and one of the AxSection is additional control which has it’s own Dataset (where some of the fields are “Mandatory”), but this AxSection become Edit(true) only if I mark the checkbox (see in red).

The problem is occurs only when the checkbox is unchecked.

So, does anybody experienced ever with similar problem? If no – maybe someone know the sequences of methods called by the TopOk buttonEP1.jpg

*This post is locked for comments

I have the same question (0)
  • Ragoza Oleksandr Profile Picture
    737 on at

    Dear experts, any ideas?

  • Rodolfo Recalde Profile Picture
    on at

    Hi,

    First, whenever possible, try to encapsulate the validation rules in method validateWrite (dataSet/dataSource or table)

     

    Another possibility (in agreement with the description of your problem) is include the field as mandatory in the dataset/dataSource (image 1)

    7181.EP_5F00_dataSet_5F00_Mandatory_5F00_DAX_5F00_Recalde2.png

    Image 1

     

    Another option is use the event ItemInserting (or ItemUpdating) to implement the validation rules:

    Occurs before the new item has been inserted by the form control.

    Example: HcmEPOpenJobApply (Image 2)

     

    7181.EP_5F00_dataSet_5F00_Mandatory_5F00_DAX_5F00_Recalde2.png

    Image 2

     

    Create and Update behavior

    "When the user clicks the "Save and close" button on the action pane for the User Control, the AxForm component will fire the appropriate events to create or update the data for the form component. If you are using additional components in the User Control, such as an AxGridView, you may have to explicitly invoke the events for these other components to have their create or update operations performed when the user clicks "Save and close".

    For example, the following C# code is the event handler for the ItemUpdating event of an AxForm component named EPSalesTableEdit. In this code, the UpdateRow event for an AxGridView component is called explicitly to ensure that any changes on the current row of the grid are saved."

     

    https://msdn.microsoft.com/en-us/library/cc551671.aspx

    Take a look:

    Microsoft Dynamics AX 2012 White Paper: Enterprise Portal Development Cookbook

     

    I Hope this Helps!

    Regards,

    Rodolfo Recalde

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans