In the catalog variable there is variable name - user (*sys_user) and on the selection Cost Center

jaiho_rai
Kilo Sage

In catalog variable I have two variable 1: User 2- Cost Center

 

If I select the user auto populate the cost center.

I have used in the dictionary the variable "Auto Populate", it working in native on admin

if there if same thing I am checking in the portal it's not populating 

 

I tried to change the variable type from string to reference to (cmn_cost_Center) but that was not working .

I tried script, getReference via call back it was not working .

10 REPLIES 10

Maddysunil
Kilo Sage

@jaiho_rai 

If you're using a script to auto-populate the Cost Center variable based on the User selection, double-check your script for any errors or issues. Make sure that the script is correctly retrieving the appropriate Cost Center information based on the selected User.

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

 

 

var req = g_form.getReference('user',costC);
function costC(req){
	alert(req.cost_center);
		g_form.setValue('u_cost_center', req.cost_center.name);

 

 

maroon_byte
Mega Sage

When you try with Portal, are you trying as an admin? or are you impersonating a user? If later, then its possible that user does not have read ACL on cost center table.

Correct, you are right there user do not have access to the cost center ? Then how to achieve in this condition

 

@maroon_byte 

You will need to updating existing read ACL on cmn_costcenter table by removing any roles and setting below condition to allow access only for interactive sessions:

 

Vancouver version:

maroon_byte_0-1712248483710.png

 

Pre-Vancouver:

maroon_byte_1-1712248514503.png