function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ivetkinivetkin 

Server Side Popup Validation and save

Hi All,

There are one VF custom page with Controller1 and a custom component (popup dialog) with Controller2.

Custom component is a registration form which requires server - side validation before save,  the result of the saving must be put to the Cotroller1  (so,  it's not possible to use @RemoteAction as it's static method and doesn't have access to controller variables)    .

 

The problem is when we submit form it is closed and the result is shown only when reopen dialog.

Is there a way to display validation result on the dialog and don't close it  if errors occur.

 

Thank you.

Vinita_SFDCVinita_SFDC

Hello,

 

You can setup a flag after save and before save and let the redirection happen when both the flags are true.

 

Please share your code to understand better.