10

I am performing a deployment from one sandbox to another using ant. The sandboxes both have PersonAccount functionality enabled. The source org has a PersonAccount record type with the name of HCP and in this source org there is a workflow rule and a field update action which sets the RecordType to HCP after create/update on the record based on the value of another field.

My problem is that the deployment to the target org fails with an error on the workflow action, that the Account object does not have a RecordType of HCP defined on it. This is semi-accurate as the RecordType is technically defined on the PersonAccount object and it does exist in the package.xml and the file source as noted below.

Component Failures:
1. workflows/Account.workflow (Account.SetAccount_HCPRecordType) -- Error: In field: lookupValue - no RecordType named Account.HCP found

PersonAccount.object

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <compactLayoutAssignment>SYSTEMPersonAccount</compactLayoutAssignment>
    <recordTypes>
        <fullName>HCP</fullName>
        <active>true</active>

My first attempt at a workaround was to pre-create the HCP record type manually in the target org on the Person Account and try the deployment again. This failed. Same error.

The only way that I was able to get a successful deployment of this package was to edit the Account.object file and remove the offending <rules> and <fieldUpdates> elements so that there was no reference in the package to the HCP record type on the PersonAccount.

  1. Is this a bug or expected behavior?
  2. What is the proper way to deploy workflow rules that are dependent on PersonAccount record types?

All files involved are SFDC API v.29

  • I've had the same problem and used the same workaround. – Mike Chale Nov 11 '13 at 13:36
  • Mark, did you ever find another workaround? I'd think this would be an issue for anyone working with the non-profit starter pack. Might also be worth asking your question in their user group on Linked-in or their SF Chatter group. – crmprogdev Mar 29 '14 at 16:27
  • The non-profit starter pack doesn't use person accounts. – DavidSchach Apr 4 '14 at 7:43
2

Short answer: No.

Longer answer: Maybe in the future, but don't count on it. #safeharbor

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.