AdvoLogix Help

Adding an Activity to an Activity Plan via Code

Updated on

The following Apex method can be used to add an Event or Task to an existing Activity Plan via custom coding. Please be aware this method requires knowledge of Force.com best practices and as always we suggest testing your code in the Sandbox.

Syntax:
ActionPlansUtilitiesExternal.AddActivity(
    @activityId,     
    @activityPlanId
);

 
Parameters:
@activityId
The Activity Id to be added to the Activity Plan.

@activityPlanId
The Activity Plan Id to which the activity is to be added.


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 is hauled with any unexpected error.  

Example:
ActionPlansUtilitiesExternal.AddActivity (
    'a0A9000000RJhKTEA1', 
    'a05900000051CpN'
);

Previous Article Creating an Activity Plan via Code
Next Article Updating 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.