Dialog window using UI Action - does not save the main form after clicking OK Button

Hardik Panchal
Mega Guru

Hello All,

 

I have a ui action, that opens up a dialog window to assign roles to the user.

 

My requirement is that on the main user form, if few details are filled or changed and then the ui action is clicked to open the dialog window and assign roles, after clicking on 'ok' in the dialog window, it should also save the details from the main form into the user record along with the roles.

 

But as per the below configuration, the roles are added, but if the main user form details are modified, it is snot getting saved.

 

1. UI action 

HardikPanchal_0-1693127670217.png

 

2. UI Page

HardikPanchal_1-1693127890684.png

3.After clicking on OK, it gives this alert and the main user form details are not saved.

HardikPanchal_2-1693128011355.png 

HardikPanchal_3-1693128071531.png

 

Please help.

Thanks

 

 

1 ACCEPTED SOLUTION

Samaksh Wani
Giga Sage
Giga Sage

Hello @Hardik Panchal 

 

In your client script you need to save the form and it should be return true instead of value and remove the line of GlobalDialogWindow, it is destroying the page.

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

 

View solution in original post

5 REPLIES 5

Samaksh Wani
Giga Sage
Giga Sage

Hello @Hardik Panchal 

 

In your client script you need to save the form and it should be return true instead of value and remove the line of GlobalDialogWindow, it is destroying the page.

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

 

Hey Samaksh,

Thanks for your reply.

I made the following change to the code, now the main form is saving but I'm still getting this alert as shown in the below 2nd screenshot.

I want to eliminate the alert and save both the dialog form as well as the main form.

 

HardikPanchal_0-1693129354111.png

HardikPanchal_1-1693129439218.png

 

Hello @Hardik Panchal 

 

Remove that line

reloadWindow(self);

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

It worked Samaksh.

 

Thank u so much for your help.