0

I am having a hard time writing an Apex script properly to remove all users assigned to a permission set called E2CP Case Feed End User. Here is what my error is (in Copado):

ERROR Unexpected token 'permID'. Line: 1 Column: 4

Here is my code:

ID permID = [SELECT Id FROM PermissionSet WHERE name = 'E2CP_Case_Feed_End_User'].Id:
delete [SELECT Id FROM PermissionSetAssignment WHERE PermissionSetId = :permID];

I appreciate any advice!

2
  • Hi Beth, welcome to SFSE! As this is the Salesforce Stack Exchange, no need to seek out tags with Salesforce in the name to let us know that is your subject area. The [community] tab is to be used for issues pertaining to the Salesforce Communities feature, which this question does not appear to be.
    – Adrian Larson
    Sep 13, 2021 at 0:54
  • So sorry! It is my first post. I didn't realize all the mistakes I was making in a post according to you. I will study the post protocol before I try to ever post in the future.
    – user104641
    Sep 13, 2021 at 12:18

1 Answer 1

2

Replace the colon : at the end of your first line with a semi-colon ;.

1
  • Thank you so much!
    – user104641
    Sep 13, 2021 at 12:18

You must log in to answer this question.