function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravi Panchal 8Ravi Panchal 8 

FIELD_INTEGRITY_EXCEPTION: id value of incorrect type

Create one Task record where
ActivityDate = {!$Flow.CurrentDateTime} (7/11/2022, 11:18 PM)
Description = {!$Label.Accouunt_Flow_label} (This label is from auto launch flow.)
OwnerId = {!ownerId} (0015h00000puR7OAAU)
Priority = High
Status = Not Started
Subject = Call
WhatId = {!recordId} (0015h00000puR7OAAU)
Result
InfoFailed to create record.

This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Assigned To ID: id value of incorrect type: 0015h00000puR7OAAU. 
Best Answer chosen by Ravi Panchal 8
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Ravi,

You are giving ownerid and whatid as same record. Can you change the ownerid field with some user a nd try it.

Let me know if you face same issue.

If this solution helps, please mark it as best answer.

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Ravi,

You are giving ownerid and whatid as same record. Can you change the ownerid field with some user a nd try it.

Let me know if you face same issue.

If this solution helps, please mark it as best answer.

Thanks,
 
This was selected as the best answer
mukesh guptamukesh gupta
Hi Ravi,

Reason behind :-

both have same Id that's why you are facing error 

OwnerId = {!ownerId} (0015h00000puR7OAAU)  /// here should be user Id
WhatId = {!recordId} (0015h00000puR7OAAU)  /// here should be record Id like Account record Id

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
Ravi Panchal 8Ravi Panchal 8
As you told i removed the whatId and now there is only one Id still it is giving error.

Create one Task record where
ActivityDate = {!$Flow.CurrentDateTime} (7/12/2022, 6:52 AM)
Description = {!$Label.Accouunt_Flow_label} (This label is from auto launch flow.)
OwnerId = {!recordId} (0015j00000alN17AAE)
Priority = High
Status = Not Started
Subject = Call
Result
InfoFailed to create record.

Error Occurred:
This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Assigned To ID: id value of incorrect type: 0015j00000alN17AAE.

Thank you advance
Ravi.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Ravi,

No need to remove the whatId. You can put whatid as it is and change the OwnerId to some user or your userid so this will get resolved.

Thanks,
 
Ravi Panchal 8Ravi Panchal 8
Thank you, Sir, this solved problem can you tell what is difference them made in flow. Just for knowlodge.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

The issue is owner should be only user for a record. But you have assigned Accountid for the owner which caused the error.

Thanks,