function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sancasanca 

how to populate lookup field without having access to that lookup object using trigger

Hi Devs,

I need a urgent help !!! There is Api only User Profile which is accessed by Third party application . The Profile has permission to read and edit opportunity object and Task object only and no access to other objects(including contact object )as security concerns . 
The third party application wants to create a task and assoiciate who id to contact record and what id to opportunity record . The 3rd party is able to create task and associate to opportunity but cannot associate it to contact .
So workaround which we created was a custom field which will store contact id provided by custom field and assoicate that task to contact present in contact id field using trigger (since trigger run in system mode) .But the issue still persist and application is not able to associate contact record to task during creation . 
Are they any alternatives ?

Regards,
Sanju C A