• JMThornton
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

Hello everyone,

 

I'm trying to use the result of a query to query on another object:

 

 

 List<Opportunity> oppList = [Select AccountId From Opportunity where Id = :a.Opportunity__c];

 List<Account> accList = [Select Is_Trade_Account__c From Account Where Id in :oppList];
I'm getting an invalid bind expression error on the 2nd query as it is of type Account.

Is there some way around this? Casting? toString? This seems like it should be a pretty fundamental concept and I'm just missing something.
Thank you in advance!
-Jon

 

Hello everyone,

 

I'm trying to write a trigger that will only fire when a particular field is updated on an object. Not when any other field is modified. is something like this possible in APEX?

 

Any help is greatly appreciated, thanks!

-Jon