We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Transform Map issue

Debasis Pati
Kilo Sage

Hello All,
i have a excel sheet data with updatedgroupname and existinggroupname values.
i need to update the data existinggroupname is coelece so that it wont create updated fileds also i have created one on before script to do the name change.

gs.info("test123------"+source.u_updatedgroupname);
    target.name = source.u_updatedgroupname;
  
The issue is group name is not updating.
@Ankur Bawiskar any suggestions?

1 ACCEPTED SOLUTION

@Debasis Pati 

yes it won't work to give security_admin via script.

Not a good practice to give security_admin via script even if it's feasible

security_admin role should be given only by Security admins and it should be a manual activity.

I believe I answered your original and subsequent questions.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

17 REPLIES 17

@Debasis Pati 

you can handle everything in onBefore.

onAfter won't be proper place as your other logic is already in onBefore

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Okay @Ankur Bawiskar ,
I will try to accommodate both the the scripts to "on before".
I have a question if my script tries to add security admin role (i mean create a record in group has role ) table while i have only admin role will it be able to i wonder it wont do.
in that case do i need to provide security admin role to myself then run the transform or is there any other way?

@Debasis Pati 

yes it won't work to give security_admin via script.

Not a good practice to give security_admin via script even if it's feasible

security_admin role should be given only by Security admins and it should be a manual activity.

I believe I answered your original and subsequent questions.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader