Hi,
I am trying to use the set_relationship function of suite rest api, to add a relation to the users. But I am unable to get it successsfully inserted into database.
I am not getting any error in the response also.
I am using .net C#.
The code to set relationship that I am using is :
List relatedIds = new List
{ roleid};
req.module_name = "Users";
req.module_id = userid;
req.link_field_name = "ACLroles";
req.name_value_list = new List<string>()
{
};
req.related_ids = relatedIds;
Am I doing anything wrong here? I checked for vardefs.php file too to get the relationshipname for users and roles, but did not find it. so used the linkfield name as ACLroles.
Also, I am trying to set a relationship between users and security groups using the following code, but facing same issue as above:
List relatedIds = new List
{ securitygroupid };
req.module_name = “Users”;
req.module_id = userid;
req.link_field_name = “SecurityGroups”;
req.name_value_list = new List<string>()
{
};
req.related_ids = relatedIds;
Any help is appreciated.
Thanks