You need to sign in to do that
Don't have an account?
ch-sjo
New / updated product: add / update standard price list entry for all currencies
We are synchronizing products from an external system. We provide a price in a custom field (cost__c) and also the currency.
To be able to import pricelists in all currencies (we create one price list per sales channel), SalesForce requires that the price must exist in the same currency in the Standard Price List.
So - I'd like to do the following:
Whenever a product is added / updated - take the value in cost__c and the currency on the product. Create an entry for every currency in the list of active currencies in the Standard Price List.
To be able to import pricelists in all currencies (we create one price list per sales channel), SalesForce requires that the price must exist in the same currency in the Standard Price List.
So - I'd like to do the following:
Whenever a product is added / updated - take the value in cost__c and the currency on the product. Create an entry for every currency in the list of active currencies in the Standard Price List.
Please check with the below idea from success community which might give you better understanding of handing the above requirement.
- https://success.salesforce.com/ideaView?id=08730000000GnJFAA0
Please let us know if you are looking anything in addition.Best Regards,
Nagendra.P
Thank you very much for this. I did the "Excel-excersise" when I tried to understand how price lists works - so I am quite familiar with such process. I just need to transfer that process into an apex-implementation that triggers on "after insert, after update".
I will spend tomorrow to start trying to implement this and I will keep this thread updated (or use it to ask for help). I suspect that I am not the only one that would like to have this functionality.
Best Regards,
Christer
Guys, please take a look and scrutinize my code - please feel free to suggest improvements. I also need to write tests for this and think that it is tricky to do. I'd appreciate if someone would help me with this (I will of course try myself and post the result here).
I have moved the "insert" to outside the for-loop, but I still get the same results if I push to many updates at once.... Any ideas?
Any ideas?
Hey ch-sjo can you provide with the full trigger fixed code with the batch please. I am having the same issue.
Thanks,
Darko
And can you also provide the triggermonitor because I am getting this error when i am trying to save.
Error: Compile Error: Variable does not exist: TriggerMonitor.ExecutedTriggers at line 12 column 10