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
Rohit2006Rohit2006 

Finding out wheteher trigger is fired by UI operation or API operation

Hi
I am using Eclipse IDE for salesforce trigger development. I have written a before insert trigger for Task object and inside that I want to find out the task is being created via SF ui or via API. I tried to use Trigger.isUi and Trigger.isApi methods but they won't compile.Is there and way to achieve this?
werewolfwerewolf
What error message are you getting when you say they won't compile?  They should work...
LegerdemainLegerdemain
Hi,

I'm looking at http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf and do not see this documented.

If I put in Trigger.isAPI(), I get:
Save error: Method does not exist or incorrect signature: Trigger.isAPI()

I am using the latest version of the Force.com IDE (Summer '08) prior to the Winter 09 Force.com IDE release that is coming soon...

Any suggestions would help.

Thanks,
Larry