Use InvolvedService when working with Involved party records.
Whenever a Service operation requires InvolvedService, set up InvolvedService using the following code:
InvolvedService involvedService = platform.getInvolvedService(); |
The following sample adds a new Involved party to a project.
During Involved party creation, you can to set objects in the Involved party record, including the Involved party unique code and the associated project.
Involved newInvolved = involvedService.newInvolved(project, contact, "INPA_EXPE"); |
The following sample returns an Involved party.
//The id initialized here is the id of an existing project Long id = 1234567890L Involved involved = involvedService.read(id); |
The following sample creates an Involved party record. The sample includes an InvolvedService.search() method. This search() method is different from the ResourceService.search() methods because the InvolvedService.search() method includes the unique code of an existing project as a parameter.
List<Involved> involveds = involvedService.search("unique code", "search view key"); |
The following samples delete an Involved party record.
involvedService.delete(involved); //or //The id initialized here is the id of an existing project Long id = 1234567890L; involvedService.delete(id); |