+ Start a Discussion
teddyteddy 

User Context Appex Code is Running

I was under the impression that Apex Code runs under 'Administrator' Profile and is not affected by the user profile loggedin. I am getting errors from triggers complaining  about  Security settings.  Could any body  help to point out if  my asumptions were wrong or if there is a way to force apex triggeres and classes to run under 'Administrator' Profile?

Thanks,
TehNrdTehNrd
What object is the trigger on? I ran into the same problem and it turned out to be a bug. Salesforce.com is aware of the issue I ran into and as far as I know is working on a fix.
MelliottMelliott
I actually figured out that I had to create a hidden field to translate the pick list values using if and IsPickVal and then pass through the resulting text to the new object.  Just took some planning and fighting the sytax errors.
TehNrdTehNrd
Wrong thread melliott ;)

Here is the thread I initally created and meant to updated it but never did.

http://community.salesforce.com/sforce/board/message?board.id=apex&message.id=1075

-Jason
TehNrdTehNrd
I suppose I should have added some more detail.

This is when the error occurs for me:
Before or after delete trigger on OpportunityLineItem when the related opportunity is not owned by the user trying to delete the line item. This user has permission to edit opps and line items and there are sharing settings that share the opp. If you are working with SF support here is my case number they can refererence, 01426770.