When location based security is enabled and a new project is created through the API; how would the default users assigned to the branch be assigned programatically to have access to the project?
To copy user assignments from a Branch -
StockingLocation branch = StockingLocation.GetStockingLocation("BR-011", false);
StockingLocation job = StockingLocation.GetStockingLocation("JO-01", false);
foreach (var item in branch.BranchOfficeUserAssignments.SortedAssignedToBranch)
{
var userAssignment = job.JobSiteUserAssignments[item.UserID];
userAssignment.StockingLocationID = job.StockingLocationID;
userAssignment.AssignedToJob = true;
}
job.Save();
Thank you for posting!
Thank you for the response, we will take this under advisement