Info message is not shown when action to add user to group is aborted.

Kalyani35
Tera Guru

Hi all,

we want to restrict the users to be added to group if certain conditions are met. we also want to show error message when that happens. 

With the before insert business rule we have written, it does not allow user to get added to that group however that info message is not displayed. This happens only in case when we are trying to add user to group by using edit button on User related list on Group form. Please see screenshot below

Kalyani35_0-1701261022484.png

 

If we try to create group-user relationship on sys_user_grmember table directly then the BR runs as expected and info message is also shown. 

How this can be solved. Anyone faced issue like this?

Kalyani35_0-1701260784512.png

if (condition) {
     gs.addErrorMessage("User is not allowed to be added to this Group");
     current.setAbortAction(true);
 
    }
 
 

Thanks!

 

 

 

5 REPLIES 5

Prabhu9
Tera Expert

@Sourabh TarlekrI've tried using a display BR and before BR with display BR order set higher than before BR. I'm doing my validation in the before BR and in return I'm setting a message using putClientData and accessing it via getClientData in display BR. It is working partially. Probably you could give it a try and see if it works fine for you.