• Vasant
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Salesforce Solution Architect

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
My Client is looking to sell off one of their Business Units. This means all the users and their data from our existing production org needs to be moved to a new org to be bought for the moving out business unit. Now what is the easiest way to do this? I know we can migrate all users and related records but this is very tedious process. I am exploring if there is any way Salesforce can clone our Production org into a new Production org and then we can simply delete rest of the users and rest of the data i.e. anything other the Business unit. Is this possible? 
I have used Database.insertImmediate(objOppSplitHistories); method to insert/update records into OppSplitHistories (my custom big object).
Here I have used the above method in apex class and called that method from oppsplit trigger to pass the old map/new map info for saving opp splits changes. But that is throwing the below error. I have observed if I run the same piece of code in ‘Execute Anonymous Window’ then data is  being inserted in to custom big object but despite using insertImmediate method it is not working through trigger.

Error: Update failed. First exception on row 0 with id 049c0000002JaopAAC; first error: UNKNOWN_EXCEPTION, EXTERNAL_OBJECT_UNSUPPORTED_EXCEPTION: Apex triggers can't reference the Big Object BigObjectCounter: []

It seems we cannot populate any bigobject through trigger . Can you please confirm whether my understanding is correct or not.
If it is correct then what should be our approach to populate this big object? Any help will be much appreciated. 
  • November 21, 2017
  • Like
  • 0
I have used Database.insertImmediate(objOppSplitHistories); method to insert/update records into OppSplitHistories (my custom big object).
Here I have used the above method in apex class and called that method from oppsplit trigger to pass the old map/new map info for saving opp splits changes. But that is throwing the below error. I have observed if I run the same piece of code in ‘Execute Anonymous Window’ then data is  being inserted in to custom big object but despite using insertImmediate method it is not working through trigger.

Error: Update failed. First exception on row 0 with id 049c0000002JaopAAC; first error: UNKNOWN_EXCEPTION, EXTERNAL_OBJECT_UNSUPPORTED_EXCEPTION: Apex triggers can't reference the Big Object BigObjectCounter: []

It seems we cannot populate any bigobject through trigger . Can you please confirm whether my understanding is correct or not.
If it is correct then what should be our approach to populate this big object? Any help will be much appreciated. 
  • November 21, 2017
  • Like
  • 0

I have the following SOQL used in a VisualForce page:

 

"Select c.Product__r.PA_Product_Class__c productClass, sum(c.Rolling_12_Current__c) sales from PA_Customer_History__c c where c.Account__c = '{!account.Id}' group by c.Product__r.PA_Product_Class__c"

 

The field Rolling_12_Current__c is a currency field and the records I am querying are all in USD. Our corporate currency is EUR. My user is set up with a currency of USD. When the query is run, the sum() returns back a converted value in EUR instead of USD. According to the documentation at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm, this shouldn't happen: "Currency data is converted to the user's locale and then processed by the aggregate function."

 

My user's currency is in USD, so it should display it properly in USD. As a temporary work around, I've changed our exchange rate to 1. Can someone please let me know how I can get the SOQL aggregate to return the values in my user's currency? I tried using convertCurrency, but I get a malformed query error.

Hi,

 

   I am working on one workflow which sends out some notfication email to user depending on some data from opportunity.

 

   One of the triggering rule is ...the Opportunity Amount > 15000 USD.

   Since the currency in the opportunity varies, it could be USD or maybe not.

   How can i conver the Opportunity Amount in other currency into USD by using formula?...