As a regular user (not system administrator) is it possible to create a share for a object that I'm not the owner of in APEX?
Or will the DML statement throw an error?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
This should be possible either through a Class that uses "without sharing" or an Apex Trigger. These will function no matter who does the update. A class that uses "with sharing" will have a problem, though.
Quick warning: I've never deal with TaskShares, and I never make bets on whether Tasks will behave like normal objects.