• arcticcloud
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi all.


I am trying to fire a trigger when a new opportunity is created to select the account's default currency for this opportunity. 

 

trigger currencyTransfer on Opportunity (before insert) {
  for(Opportunity opp : Trigger.new){
   opp.CurrencyIsoCode = opp.Account.CurrencyIsoCode;
   }
}

 I guess it doesn't work to lookup the currency through the account this way - what else can I do? Any help would be greatly appreciated

Hi all.


I am trying to fire a trigger when a new opportunity is created to select the account's default currency for this opportunity. 

 

trigger currencyTransfer on Opportunity (before insert) {
  for(Opportunity opp : Trigger.new){
   opp.CurrencyIsoCode = opp.Account.CurrencyIsoCode;
   }
}

 I guess it doesn't work to lookup the currency through the account this way - what else can I do? Any help would be greatly appreciated