You need to sign in to do that
Don't have an account?
Daphne Klozori
Trigger not working
Hi ALL,
I am new to APex Triggers and was wondering whether I can get some help here.
I am trying to link two custom objects together. One object is called "cmd", the other is an automatically created copy of the OLI, called "oliExt".
I want the trigger to automatically copy the revenue from one to the other.
My problem is the currency. CMD object is always in Company Currency, i.e. CHF. oliExt object can be in any currency. the user has picked.
I thought there is an easy way of writing the trigger, so that the oliExt revenue is always converted into CHF when auto-filled into the CMD, but don't know how...
Below is the line that I need to fix in the trigger:
"cmd.SFDC_Revenue__c = convertCurrency[oliExt.UnitPrice__c]"
Any help is much appreciated!
I am new to APex Triggers and was wondering whether I can get some help here.
I am trying to link two custom objects together. One object is called "cmd", the other is an automatically created copy of the OLI, called "oliExt".
I want the trigger to automatically copy the revenue from one to the other.
My problem is the currency. CMD object is always in Company Currency, i.e. CHF. oliExt object can be in any currency. the user has picked.
I thought there is an easy way of writing the trigger, so that the oliExt revenue is always converted into CHF when auto-filled into the CMD, but don't know how...
Below is the line that I need to fix in the trigger:
"cmd.SFDC_Revenue__c = convertCurrency[oliExt.UnitPrice__c]"
Any help is much appreciated!
Please follow these links related to your query:
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008omIIAQ
http://salesforce.stackexchange.com/questions/13282/updating-multi-currency-rates-from-apex
Hope these links will help you.
Thanks
Vikash_SFDC