Showing posts with the label insert resource to resource group Microsoft CRM 2011

how to insert resource especially System User into Resource Group in Microsoft CRM 2011 SDK

Hi Again, First,we have to get deep technical information about Constraint definition file; here is the definition in XML format; <Constraints>   <Constraint>     <Expression>       <Body>         resource["Id"] == {ac8e6996-ef65-e211-bc9b-005056820011} ||         resource["Id"] == {4a65de5a-d763-e211-bc9b-005056820011} ||         resource["Id"] == {626E49EC-2011-E211-84B5-005056820011}       </Body>       <Parameters>         <Parameter name="resource"/>       </Parameters>     </Expression>   </Constraint> </Constraints> Body tag refers to any resources in the Resource Group. if you add primary key as guid for the record  to the constraint with 'or' logical word, you will see them in the selected resource group in CRM You can get inspiration from AddMembersToTheConstraint methods as shown bolew,Method takes  constraints string and id of mem