• Darshil shah 12
  • NEWBIE
  • 0 Points
  • Member since 2016

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

I am getting error 
Error: Compile Error: No such column 'account' on entity 'Contract'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 6 column 67

but I am using standard fields which are available on contract object , my code is as below, can some one help me on this.
trigger updatePicklist on Contract (before insert, before update) {
    List<id> contractIds = new list<id>();
    for(contract c : trigger.new){
        contractIds.add(c.id);
    }
    map<account,contract> contractMap = new map<account,contract>([select account,Pricebook2 from contract where account in : contractIds]);
}