• Pablo Escobar
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi I'm new developing appex triggers and i can't make a trigger to work

 

I have to update a field on a custom object called pse__Timecard_Header__c The problem is that the field to update is a lookup field

 

  1. This field to be updated is: Manager__c  
  2. The manager info is located in the salesforce standard object caled "User" and the field name is called "Manager"

The Problem is that there is no direct link between the "user" object and my custom object called "timecard"

There is a looup field at the timecard to a custom "contact"  and from the contact there is a direct link to the salesforce "User"

 

 Summary: Timecard -> Contact -> Salesforce User

 

Thanks!!

 

Pablo

 

 

Hi I'm new developing appex triggers and i can't make a trigger to work

 

I have to update a field on a custom object called pse__Timecard_Header__c The problem is that the field to update is a lookup field

 

  1. This field to be updated is: Manager__c  
  2. The manager info is located in the salesforce standard object caled "User" and the field name is called "Manager"

The Problem is that there is no direct link between the "user" object and my custom object called "timecard"

There is a looup field at the timecard to a custom "contact"  and from the contact there is a direct link to the salesforce "User"

 

 Summary: Timecard -> Contact -> Salesforce User

 

Thanks!!

 

Pablo

 

 

Our organization would like to convert all Person Accounts to Contacts. We would like the converted contact to be connect to an account named, "Generic Contact."  I looked into this a little and this is what I found out. 

 

Option 1:

Each Person Account has a record in both the Account table and Contact table.  The Contact table holds all the Person Acount information.  The Contact table has a field called IsPersonAccount which is marked true. I would like to change the IsPersonAccount to false, change the AccountId to that of the "Generic Contact" account and Delete the Account with the old AccountId.

 

Whenever I try to change the IsPersonAccount to false, I get an error "INVALID_FIELD_FOR_INSERT_UPDATE".

 

Option 2:

Now I can export the contacts to a csv file and  filter out all contacts with business accounts leaving the Person Accounts.  Then I can delete all Person Accounts and import the people in my csv file as contacts.  Finally, reconnect all compaigns using the PHP API.  

 

 

I would much rather change the AccountId and IsPersonAccount fields  (much less work).  Is there anyway to do option 1 or is there a better way of converting PersonAccounts to Contacts?