• Erin Yamaoka
  • NEWBIE
  • 0 Points
  • Member since 2015

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

Hi All, 

Our managed package is not Multi-Currnecy enabled. Therefore we dont have the standard currency field in our Packaging oug. We created field-set on the Allocation object. Howevere when we upgraded to the customer with Multi-currency enabled, they dont see the Currency field on the added field set. If there a way to add the currency field to the field set in the customers org or is the only solution to make our package org a multi cureency enabled org and add the field to the field set and re-push an upgrade for the customer? 

Thanks, 
Terry

I'm trying to copy a new user as contact by using a trigger but I'm getting the following error

 

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Contact, original object: User

 

trigger Acceleration_User_Copyto_Contact on User (after insert, after update) {
    
   // Map<String,User> newLead = new Map <String, User>();
    
    system.debug('Acceleration_User_Copyto_Contact Trigger....');
 
    for ( User user : System.Trigger.new)
    {
        if  (user.Email.contains('acceleration'))
        {
            system.debug('Acceleration_User_Copyto_Contact Trigger..2.');
            Integer RecordCount = [select count() from Contact c where c.Email = : user.Email];
            
            system.debug('Acceleration_User_Copyto_Contact Trigger..2a .' + RecordCount);
            
            if (RecordCount == 0)
            {
                String AccountId = '';
                for ( Account a : [Select a.Id From Account a where Name = 'Acceleration']) 
                {
                    system.debug('Acceleration_User_Copyto_Contact Trigger..3.');
                     
                    AccountId = a.Id;
                
                    Contact con = New Contact();
                    con.AccountId = AccountId ;
                    con.Email = user.Email;
                    con.Firstname = User.Firstname;
                    con.Lastname = User.Lastname ;
                    con.User__c = User.Id;
                    insert con;
                }          
            }                   
        }
        
     }
    
    
}

 

Hi All, 

Our managed package is not Multi-Currnecy enabled. Therefore we dont have the standard currency field in our Packaging oug. We created field-set on the Allocation object. Howevere when we upgraded to the customer with Multi-currency enabled, they dont see the Currency field on the added field set. If there a way to add the currency field to the field set in the customers org or is the only solution to make our package org a multi cureency enabled org and add the field to the field set and re-push an upgrade for the customer? 

Thanks, 
Terry