hello forum members,
Did anyone tried to customize EnsureEnterpriseResources()
to instead of using array of resource names to use array of username? We have resources with the same names and passing just the name instead of a unique usernames creates a problem for those with the same name.
if so, can you provide an example? thank you advance for any suggestion.
privatestatic Guid[] EnsureEnterpriseResources(SvcResource.Resource resourceSvc) {string[] resourceNames = newstring[] { "Lertchai Treetawatchaiwong","Bricks","Conference Room A","Rental"}; PSLibrary.Resource.Type[] resourceTypes = new PSLibrary.Resource.Type[] { PSLibrary.Resource.Type.WorkResource, PSLibrary.Resource.Type.MaterialResource, PSLibrary.Resource.Type.WorkResource, PSLibrary.Resource.Type.CostResources }; Guid[] resources = new Guid[resourceNames.Length];for (int i = 0; i < resourceNames.Length; i++) { resources[i] = EnsureEnterpriseResource(resourceSvc, resourceNames[i], resourceTypes[i]); }return resources; }
tatiana