Article #000001024
Summary
An error occurs when a user does not have the delete permission on the AP Tasks and APT Task Templates objects. Delete capabilities cannot be removed from these Activity Plan line items.
Question
Why do I get the error below when I try to create an activity plan?
An Apex error occurred: System.FinalException: ApexPages.addMessage can only be called from a Visualforce page
Resolution/Workaround
Go to the user's profile and ensure they have delete permissions for the AP Tasks and APT Task Templates objects.