You need to sign in to do that
Don't have an account?

Which user fields to set for managed package
Hi,
I have an app that allows administrators to create users within the application to avoid forcing them to learn how to use Setup / Users. I have this working in a manage package which I now need to install in to a DE to get the application through security review. When I tried to upload the package into the DE the upload failed with this message:
Invalid field UserPermissionsChatterAnswersUser
I have had to set many of the user permission fields to make this feature work. The permission fields I have used are in the following code exceprt:
I could just comment out the offending field but a). that may cause other errors, and b). there may be other fields in the list that are invalid in different SF org levels.
I have read somewhere that I can use this notation:
newUser.put('UserPermissionsMarketingUser', true);
But I do not know if it will address the problem. I do not want to use trial and error, because it takes many steps and at least a day to create a new package and regression test.
Any ideas?
Thanks
I have an app that allows administrators to create users within the application to avoid forcing them to learn how to use Setup / Users. I have this working in a manage package which I now need to install in to a DE to get the application through security review. When I tried to upload the package into the DE the upload failed with this message:
Invalid field UserPermissionsChatterAnswersUser
I have had to set many of the user permission fields to make this feature work. The permission fields I have used are in the following code exceprt:
newUser.UserPermissionsCallCenterAutoLogin = false; newUser.UserPermissionsChatterAnswersUser = false; newuser.UserPermissionsInteractionUser = false; newUser.UserPermissionsKnowledgeUser = false; newUser.UserPermissionsMarketingUser = false; newUser.UserPermissionsMobileUser = false; newUser.UserPermissionsOfflineUser = false; newUser.UserPermissionsSFContentUser = false; newUser.UserPermissionsSiteforceContributorUser = false; newUser.UserPermissionsSiteforcePublisherUser = false; newUser.UserPermissionsSupportUser = false;
I could just comment out the offending field but a). that may cause other errors, and b). there may be other fields in the list that are invalid in different SF org levels.
I have read somewhere that I can use this notation:
newUser.put('UserPermissionsMarketingUser', true);
But I do not know if it will address the problem. I do not want to use trial and error, because it takes many steps and at least a day to create a new package and regression test.
Any ideas?
Thanks
newUser.put('UserPermissionsMarketingUser', true);
However, this caused an error when running the class containing this code, so I put the code for each individual assignment in a try / catch block as below:
All is now working fine