0

I have a screen flow that takes some input from the users on case screen and creates a task on case and then creates a note on the task created in previous step. Issue is, when i am trying to do this flow from Community(Customer Community Plus Login Profile), i am getting error:

This error occurred when the flow tried to create records: INVALID_CROSS_REFERENCE_KEY: invalid cross reference id. You can look up ExceptionCode values in the SOAP API Developer Guide.

But same done from System administrator logged into Community or Service Console, the flow is completed and both task and notes are created. Cheking the permissions, I cannot find Object level permissions (was missing from salesforce UI) but the FLS for whatever fields i am using, are set to Read+Edit.

Step 1: created_the_task:
Description - "My Description"
WhatId - {!CaseID}

Step 2: create_the_Note:
Content - "My Content"
Title- "My Title"

Step 3: Create_Content_Doc_Link ContentDocumentId - {!NoteID_from_Step_2}
LinkedEntityId - {!Task_ID_from_Step_1}
Result
Failed to create record.
Note: When LinkedEntityId is set to Case ID, note is getting created in case related list, But for Task Id, it is throwing error "INVALID_CROSS_REFERENCE_KEY".

Any kind help in this regard.

2
  • 1
    Usually,INVALID_CROSS_REFERENCE_KEY error occurs whenever you try to refer the lookup field which doesn't have read/edit access.So,please check the Object level permission on the profile of the user with which you are trying to create the Task. – Shirisha Pathuri Oct 19 '20 at 15:58
  • I tried to find object level permissions for task in customer community login profile, but only FLS was coming.. – KKumar Oct 19 '20 at 17:27

Your Answer

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

Browse other questions tagged or ask your own question.