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

Case creation by Platform licensed User
Hi,
Whenever a custom object B is created a corresponding standard Case record has to be created. The user who creates the record of object B has a salesforce platform license. There is trigger which inserts case everytime a B record is created. Since the user has a platform license he will not be able to access Case. But what I did not understand is when the user creates a record of object B how does the trigger not fail and go on to create a Case even though the User cannot access Case?
Thank you,
Nisha
Whenever a custom object B is created a corresponding standard Case record has to be created. The user who creates the record of object B has a salesforce platform license. There is trigger which inserts case everytime a B record is created. Since the user has a platform license he will not be able to access Case. But what I did not understand is when the user creates a record of object B how does the trigger not fail and go on to create a Case even though the User cannot access Case?
Thank you,
Nisha
if (Schema.sObjectType.your_own_object__c.isCreateable())
I remember, during DEV501 training, I was told With Sharing keyword only works for Web service call from out side.
In Apex developer guide, in "Enforcing Sharing Rule", it says:
Enforcing sharing rules by using the with sharing keyword doesn’t enforce the user's permissions and field-level
security. Apex code always has access to all fields and objects in an organization, ensuring that code won’t fail to run because of
hidden fields or objects for a user.
With Sharing won't change the object or field permissions. It means the method can access to all objects and fields in the case of being called by a trigger.