Hello forum members,
we have custom fields for resources and I need help figuring out how to write a job that updates resource custom fields after AD sync have been completed.
Can anyone provide any code examples?
i found this code that will check out a resource and update its name: http://msdn.microsoft.com/en-us/library/websvcresource.resource.updateresources(v=office.12).ASPX
but how would you handle a custom field? How would you look up a custom field ID ? what code would you recommend to loop it through all changed resources? (if there are thousands of them)
is there a way to set this up to run once a day?
resourceSvc.CheckOutResources(new Guid[] { resourceDs.Resources[0].RES_UID });// Update the resource name of the first row. Console.WriteLine ("Modifying resource "+ resourceDs.Resources[0].RES_ID + " ("+ resourceDs.Resources[0].RES_NAME + ")"); resourceDs.Resources[0].RES_NAME += " Modified at: "+ DateTime.Now.ToShortTimeString();// Send the update to the server and automatically check in the changed row resourceSvc.UpdateResources(resourceDs, false, true);
tatiana