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
sevgisevgi 

is SOQL allowed in formula definitions?

Found an Idea dated a few years back (http://success.salesforce.com/ideaview?id=087300000006n6mAAA) suggesting the use of SQOL in formulas. Has it been implemented?

 

if not is there an improved alternative to what was suggested for a similar query in 2007 :

 

Not sure if this would work, but you can use SOQL in an Apex trigger, which could be fired in response to a field update, which could be set by a workflow.  You'd end up with the value in the field, after the record had been saved.

Hope this helps.

- Rick Greenwald

 

Thanks

 

Best Answer chosen by Admin (Salesforce Developers) 
Baktash H.Baktash H.

i am sure it has not been implemented and i would make it pretty similar to what rick greenwald suggested, but not the same.

you could write a trigger which is fired when the record is created or edited, and this trigger does the soql and updates your field. then would happen what he says "You'd end up with the value in the field, after the record had been saved"

 

but i don't see necessity for a worklflow.