個人取引先が作成されると (または既存の法人取引先が個人取引先に変更されると)、対応する取引先責任者レコードも作成されます。この取引先責任者レコードは、「個人取引先責任者」といいます。対応する個人取引先責任者レコードの ID は個人取引先レコードの PersonContactId 項目に保持されます。
<エラーの再現手順>
1.個人取引先レコードから PersonContactId を取得します
SELECT PersonContactId from Account Where Id=001******
2 .PersonContactId を取得し、API 経由で取引先責任者の RecordType を既存のレコードタイプに変更します
Account account = [SELECT PersonContactId from Account Where isPersonAccount=true limit 1];
Contact contact = [SELECT ID, RecordTypeId from Contact where ID =:account.PersonContactId ];
contact.RecordTypeId = '012*******';
update contact;
3. 以下のエラーが発生します
System.DmlException: Update failed. First exception on row 0 with id 003xxxxxxxxxxx; first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: []
レコードタイプを操作・設定する際には、個人取引先責任者ではなく、個人取引先から実施する必要があります。そのため、個人取引先責任者のレコードタイプを編集することはできません。これは、製品の想定された動作です。
005305352

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.