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

Is there any way to tell if my trigger is being run because of Dataloader ?
I can only think of setting up a new user for data loader jobs and testing for that user in the Userinfo class?
Can anyone think of another way?
The only other way I've come up with is to have a field that only the dataloader populates (hidden from other page layouts etc). Then your trigger can check if that field is null and if not, know it was the dataloader.
All Answers
The only other way I've come up with is to have a field that only the dataloader populates (hidden from other page layouts etc). Then your trigger can check if that field is null and if not, know it was the dataloader.
If it isn't on any page layouts do I run the risk of getting any 'Field referenced but not retrieved in SOQL' errors.
Also I think I'd need to blank out the value so regular screen updates don't throw that value back into tthe trigger later on?
I wouldn't expect page layouts to have that issue - that tends to around FLS from what I remember.
Yes, normally the final act of my trigger is to clear down the field.