CampaignItemRevenueSplit APEX Class errors
Issue:
When scheduling the CampaignItemRevenueSplit Apex class the following error can be displayed in apex jobs:
“First error: unexpected token: ';'”
Cause:
After checking the FeatureSetting AmountToSplit more than 1 value was entered - this is incorrect as only 1 value is expected.
Solution:
Remove the extra values and set just 1 value in the feature setting.
Issue:
When scheduling the CampaignItemRevenueSplit Apex class the following error can be displayed in apex jobs:
First error: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record Type ID: this ID value isn't valid for the user: 0128Z000000uvsKQAQ: [RecordTypeId]
Cause:
1 Record Type Active in the Campaign Item Revenue Split object (Site Goal), however in the Forecast object they had both Site Goal and Sales Goal active.
Solution:
Activating both Site Goal and Sales Goal Record Types in Forecast and Campaign Item Revenue Split was the first step.
Second step they needed to Activate the Record Type for the user who had scheduled the APEX jobs. See screenshot below.