pse.ServicesDeliverableServiceglobal with sharing class ServicesDeliverableService This class contains methods to push services credits deliverables and their related records to projects for delivery. EnumsAllocationMode
MethodsaddDeliverablesToProjectglobal static pse.ServicesDeliverableService.AddServicesDeliverableResponse addDeliverablesToProject(pse.ServicesDeliverableService.AddServicesDeliverableRequest request) A method which uses services deliverables as templates to push project deliverables to projects. For each deliverable specified a project deliverable will be created, as well as a project deliverable item for each active linked deliverable item. The milestones linked to the deliverable items will be duplicated on the target project, along with any linked Tasks, Project Task Dependencies, Project Task Assignments, Resource Requests, Resource Skill Requests, Schedules, Schedule Exceptions, and Risks. The date fields on these records will be shifted to account for the difference in start date between the source and target project. Input Parameters
Exceptions Thrown
Return ValueAddServicesDeliverableResponse Contains the response to adding services deliverables. Sample Code
//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.
//construct the request object
List<Id> deliverableIds = new List<Id>{
'a1r000000000001AAA',
'a1r000000000002AAA',
'a1r000000000003AAA'
};
pse.ServicesDeliverableService.AddServicesDeliverableRequest request = new pse.ServicesDeliverableService.AddServicesDeliverableRequest();
request.deliverableIds = deliverableIds;
request.projectId = 'a0r000000000001AAA';
request.allocationMode = pse.ServicesDeliverableService.AllocationMode.ALLOCATION_ALLOW_FAILURE;
//call the service
pse.ServicesDeliverableService.AddServicesDeliverableResponse response = pse.ServicesDeliverableService.addDeliverablesToProject(
request
);
//response if successful
pse.ServicesDeliverableService.AddDeliverableResult firstResult = response.results[0];
pse__Services_Deliverable_Instance__c firstDeliverableInstance = firstResult.deliverableInstance; // this will be populated
List<String> firstDeliverableErrorMessages = firstResult.errorMessages; // this will be empty
//response if there was an error
pse.ServicesDeliverableService.AddDeliverableResult secondResult = response.results[1];
pse__Services_Deliverable_Instance__c secondDeliverableInstance = secondResult.deliverableInstance; // this would be null
List<String> secondDeliverableErrorMessages = secondResult.errorMessages; // this will be populated
pse.ServicesDeliverableService.AddServicesDeliverableRequestglobal with sharing class AddServicesDeliverableRequest Contains the request to add a services deliverable to a project. Properties
MethodsAddServicesDeliverableRequestglobal AddServicesDeliverableRequest() pse.ServicesDeliverableService.AddServicesDeliverableResponseglobal with sharing class AddServicesDeliverableResponse Contains the response to adding services deliverables. Properties
MethodsAddServicesDeliverableResponseglobal AddServicesDeliverableResponse() pse.ServicesDeliverableService.AddDeliverableResultglobal with sharing class AddDeliverableResult The result of an individual services deliverable in the add deliverables to project process. Properties
MethodsAddDeliverableResultglobal AddDeliverableResult() |