+ Start a Discussion
bs881026bs881026 

Why cant we have SOQL in a trigger?

Hi,
Could anyone please explain to me, as to why cannot we have a SOQL in a trigger.

Thanks
Best Answer chosen by bs881026
ManojjenaManojjena
Hi Bs881026,

It was a issue before that we can not have SOSL inside trigger ,However you can write SOSL inside trigger now .This is implemented in Spring 11 .So you can write SOSL inside trigger .

Check below link ,samem query was before .
https://developer.salesforce.com/forums?id=906F00000008yZiIAI

Let me know if it  helps !!
Thanks 
Manoj
 

All Answers

bs881026bs881026
Hey sorry, I meant SOSL and not SOQL.

Apology
ManojjenaManojjena
Hi Bs881026,

It was a issue before that we can not have SOSL inside trigger ,However you can write SOSL inside trigger now .This is implemented in Spring 11 .So you can write SOSL inside trigger .

Check below link ,samem query was before .
https://developer.salesforce.com/forums?id=906F00000008yZiIAI

Let me know if it  helps !!
Thanks 
Manoj
 
This was selected as the best answer
bs881026bs881026
Thank you so much @ Manoj and Sachin.