1

I know this might be silly question but I am trying to upload at least 500 Partner Accounts using data loader and want to enable all of them as a Partner Account. While I try to do using data loader, it gives me an error for IsPartner is not writable.

Is there a way I can mass enable them as a Partner User using Data Loader or setting this flag to true in before insert trigger and upload them? Doing this manually would be too much.

5
  • Can you clarify if you are loading Partner Account or Partner User? I am trying to upload at least 500 Partner Accounts -- Is there a way I can mass enable them as a Partner User
    – Jayant Das
    Oct 11, 2018 at 20:03
  • Yes I mean Partner Users but needs to have Partner Accounts existed before you create Partner Users, right? and enabled each account as Partner. Let me know if I am missing anything here. Thanks.
    – JavaAster
    Oct 11, 2018 at 20:11
  • Creating Partner User is a two step process - 1. Create a Contact on a Partner Account, 2. Enable the Contact as Partner User. I assume you basically want to create and enable the Accounts as Partner during your load. Because once you have already enabled the Partner Accounts, you will still need to create the Contact and Users for Partner Users.
    – Jayant Das
    Oct 11, 2018 at 20:13
  • Yes that's correct! Once I have Partner Account created then create contacts under them and enable contacts as Partner Users.
    – JavaAster
    Oct 11, 2018 at 20:15
  • Sure. Provided a detailed answer. Hope that helps.
    – Jayant Das
    Oct 11, 2018 at 20:17

1 Answer 1

1

Assuming that you are trying to load Partner Accounts and that you want to enable them during the load process, you can do so using a trigger.

I am trying to upload at least 500 Partner Accounts using data loader and want to enable all of them as a Partner Account.

As you have figured out that the field is not writable during insert operations. However you can update the isPartner field on an Account. What you will need here is to write an after insert logic in your trigger to be able to update your accounts loaded as partner accounts.

Here's an approach, how you can do so.

trigger AccountTrigger on Account (after insert) {
    List<Account> updateList = new List<Account>();
    for(Account acct : Trigger.New){
        acct.isPartner = TRUE;
        updateList.add(acct);
    }
    update updateList;
}
2
  • Thanks a lot! Let me try out this and I hope it works so I can mark your answer as best.
    – JavaAster
    Oct 11, 2018 at 20:21
  • I ran upsert over external ids and set IsPartner to True in data loader! It worked like a charm.
    – JavaAster
    Oct 11, 2018 at 21:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .