Role Configuration with Form

Arthur Sanchez
Giga Guru

Help me here guys, I have an application with 4 forms:

  • User
  • Support
  • Manager
  • SupUser

3 list layouts:

  • User
  • Support
  • Manager

And the roles:

  • user,
  • support
  • manager
  • supuser
I created supuser so that it could enter the SupUser form, so that supports can also create tickets in a separate module, the problem is, it is entering the Support form to create a new ticket, and it should enter directly into SupUser to create , the Support form is for him to receive a ticket
Captura de tela 2024-05-09 090042.pngCaptura de tela 2024-05-09 090054.pngCaptura de tela 2024-05-09 090119.png
The flow is:
  1. the user creates 1 ticket
  2. support receives it and downloads it or changes the queue
  3. the manager monitors
Now I'm trying to implement a module where support can also create a ticket, but I can't direct it to the correct form when creating it, I have to have 2 forms for support, 1 for him to create a ticket and another for him to receive the tickets that were created by the user or other support. PLS HELP ME
11 REPLIES 11

Community Alums
Not applicable

Hey,

have you tried with view rules ? These help you force given view on conditions met ?

 

(function overrideView(view, is_list) {

	if(gs.getUser().hasRole("x_1316384_tickets.tickets_user"))
		answer = "User";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_supuser"))
		answer = "SupUser";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_seg_acs_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_seg_acs_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_seg_ims_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_seg_ims_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_seg_sms_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_seg_sms_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_app_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_app_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_brm_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_brm_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_capta_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_capta_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_gpp_1"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_ti_gpp_2"))
		answer = "Support";  // set the new view to answer
	
	if(gs.getUser().hasRole("x_1316384_tickets.tickets_manager"))
		answer = "Manager";  // set the new view to answer

})(view, is_list);

 

This is my View Rule, to define what each role belongs to (I think that's it), I thought that when I determined that the supposed role was SupUser, it would automatically be redirected, but that didn't happen

Community Alums
Not applicable

You have. See the screenshot. Let me test as well 🙂

Community Alums
Not applicable

So, as far as I crosschecked - in OOB view rules is used such pattern - gs.hasRole() - not gs.getUser().hasRole() - so change it.

Second - I remember that the view names must be all lower case (small caps)