//Used for products public static void addAclMapping(int entityId, string entityNameMapping, JArray ja) { //ADD ACL RECORD var allowedRoles = ConfigurationManager.AppSettings["CRRestrictedAccessAllowed"].Split(';'); JObject jo = new JObject(); foreach (String s in allowedRoles) { JObject ids = JObject.Parse(WebService.Get(wsCustomerRoleMapping + "?$filter=Name+eq+'" + s + "'&select=Id")); var idsValue = ids["value"].ToArray(); if (idsValue.Count() > 0) { foreach (JToken id in idsValue) { ja.Add(ParserJSon.parseNewAclToJson(entityId, entityNameMapping, int.Parse(id["Id"].ToString()))); } } } }