REST Connector - How to get Ent membership when role IDs returns in string

ejeong
All-Star
All-Star

When we get users from netsuite, role information returns like below in string format.

ejeong_1-1670373949238.png

 

in Account,customproperty31, it' showing like below 

{“Roles2”:{“entIds”:[“3, 1088”],“keyField”:“entitlementID”}}

whereas its supposed to show like below

{“Roles2":{“entIds”:[“3", “1088”],“keyField”:“entitlementID”}}

can anyone let us know how to solve this issue when integrating netsuite?

2 REPLIES 2

John_H_Jeon
New Contributor II
New Contributor II

It is possible by entering the value of CONST in CP31

"customproperty31": "#CONST#${String rolesforsearch = response?.rolesforsearch; if(rolesforsearch == null) return '{}' else {def roles = ['Roles2':['entIds':rolesforsearch?.split(', '),'keyField':'entitlementID']]; new groovy.json.JsonBuilder(roles)?.toString()}}~#~char"

NageshK
Saviynt Employee
Saviynt Employee

@ejeong I see that this is related to Connectors and not to PAM. But, did you try the solution @John_H_Jeon suggested? did it work? If yes, please mark that as the solution so that it benefits others.