Services Credits Deliverables Apex Actions

The following Apex actions are available for use with services credits deliverables. For more information about Apex actions, see the Salesforce Help.

Services Credits Deliverables Apex Actions
Category Apex Action Apex Class Purpose
Services Credits Add Services Credits Deliverables to Project ServicesDeliverableServiceActionAdd

Adds services credits deliverables to a project and automatically allocates services credits to milestones according to the specified allocation mode.

This is the same process as when adding deliverables and allocating credits by clicking Actions | Planning Tools | Add Services Credits Deliverables from a project record. For more information, see Adding Services Credits Deliverables to Projects.

Inputs and Outputs for the Add Services Credits Deliverables to Project Apex Action

The Add Services Credits Deliverables to Project Apex action includes the following inputs and outputs.

Inputs

The Add Services Credits Deliverables to Project Apex action has the following inputs.

Inputs for the Add Services Credits Deliverables to Project Apex Action
Input Required or Optional Description
Allocation Mode Required

The services credits allocation mode to use. The available modes are the following:

  • ALLOCATION_REQUIRE_SUCCESS: If errors occur, the entire process is aborted and no records are created.
  • ALLOCATION_ALLOW_FAILURE: If errors occur, the process excludes any records with errors and creates all other records.
  • NO_ALLOCATION: The process only adds deliverables to the project and does not allocate credits.
Deliverable IDs Required The list of IDs of the services credits deliverables to be added to the project.
Project ID Required The ID of the project to which deliverables are to be added.

Outputs

The Add Services Credits Deliverables to Project Apex action has the following outputs.

Outputs for the Add Services Credits Deliverables to Project Apex Action
Output Description
Add Deliverable Results

A list of results from the request to add services credits deliverables. For each services credits deliverable that is processed, the list returns the ID of the processed deliverable, along with the deliverable instance record of the newly created project services credits deliverable. If errors occur, the error messages are included instead of the created record. If the selected allocation mode is ALLOCATION_ALLOW_FAILURE, error messages related to the credit allocation might be included even if the project services credits deliverable is successfully created.

To store the output values, you can assign this to a variable resource with an apex-defined data type and use the pse__AddServicesCreditsDeliverableResult Apex class. For more information, see Output Apex Classes.

Output Apex Classes

The following output Apex classes are available for use with the Add Services Credits Deliverables to Project Apex action.

Output Apex Classes for the Add Services Credits Deliverables to Project Apex Action
Apex Class Field Field Description
pse__AddServicesCreditsDeliverableResult deliverableId The ID of the processed deliverable record.
errorMessages The list of error messages.
deliverableInstance The deliverable instance record of the newly created project services credits deliverable.