AdvoLogix Help

Updating an Activity Plan via Code

Updated on

The following Apex method can be used to update an Activity Plan's Start Date via custom coding. Please be aware this method uses asynchronous processing techniques that require knowledge of Force.com best practices as they relate to asynchronous processing. It is always suggested to test your code in the Sandbox.

Syntax:
ActionPlansUtilitiesExternal.UpdateActionPlan(
    @actionPlanId,
    @actionPlanStartDate
);


Parameters:
@actionPlanId
The Id value of the Activity Plan that needs to be updated.

@actionPlanStartDate
The new Start Date based of the Activity Plan. The appropriate activities may be rescheduled based on this date.

Result:
The function call will return a JSON formatted string in this format: {success:"",result:""}

success
Will be either TRUE or FALSE

result
Confirmation message of process completion OR error message if process encounters an unexpected error.

Example:
ActionPlansUtilitiesExternal.UpdateActionPlan(
    'a0A9000000RJhKTEA1',
    date.today()
);

Previous Article Adding an Activity to an Activity Plan via Code
Next Article Deleting an Activity Plan via Code
Still need help? Click here!
AdvoLogix® is a registered trademark of AdvoLogix.com LLC a Texas Limited Liability Company. All references to other trademarks belonging to third parties that appear on this website, documentation, or other materials shall be understood to refer to those registered trademarks owned by others, and not to any trademark belonging to AdvoLogix. Otherwise, all material herein is the copyright of AdvoLogix.com LLC. All Rights Reserved.