How to validate a property in modal window

Hi,

I have a requirement as below:

  1. On Click of a button, I have configured local action in Modal window(Button is not from pyWorkPage, It is from some other class loaded using Data Page)

  2. Using the default ModalTemplate to show local action and some business validation should be validated on this modal window screen.

  3. Error message is on the Page and on the property level, but modal window is still closed.

Can anyhow please help in how properties in modal window(which is not raised from primary page) can be validated/ how to restrict modal window not to be closed if the page has errors.

Thanks,

Nirmala J

@NirmalaJ2240

When we submit the modal dialog , there is an activity Finish assignment that runs which actually do a Page-clear of the messages . Therefore even if there are messages on the pyWorkPage they get cleared by this activity.

so only call Finish Assignment conditionally if @HasMessages When rule is resulting into False

@NirmalaJ2240 Have you tried setting error message on pyWorkPage as well?

@BhanuPrakash_G I have completed the above requirement by customizing the button. And also copying error message to the primary page also works.