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
Priscila RenwickPriscila Renwick 

FIELD_INTEGRITY_EXCEPTION: Name ID: id value of incorrect type

Hi,

I'm trying to create a Flow that will create a task when a user presses a button on a custom object (ultimately it will be several tasks, but got stuck in the first one). I'm getting the error below and I don't know what could be causing it. The WhatID is the custom record where the button is located and it's right, the WhoID is the record owner, which also seems to be right. In the error, I noticed it's showing the 18 digit ID, rather than 15, but don't know if that matters. Could anyone advise please?

Error element Pilot_Task_Activation_Meeting (FlowRecordCreate).
This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Name ID: id value of incorrect type: 005b0000004dk9sAAA. For details, see API Exceptions.

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.

Flow Details
Flow Name: Deployment_Pilot_Tasks_Create
Type: Autolaunched Flow
Version: 7
Status: Active

Flow Interview Details
Interview Label: Deployment Pilot Tasks Create 16/03/2018 16:18
Current User: Priscila Renwick (005b00000016Nyp)
Start time: 16/03/2018 16:18
Duration: 0 seconds

How the Interview Started
Priscila Renwick (005b00000016Nyp) started the flow interview.
Some of this flow's variables were set when the interview started.
var_DepOwner = 005b0000004dk9s
var_DepID = a42b0000000j37s

RECORD CREATE: Pilot_Task_Activation_Meeting
Create one Task record where:
Description = {!ActivationMeetingDescription} (Arrange initial meeting (generally done by the sales person, guidance here) that will include an environment discovery and the set up of initial devices. The environment discovery includes: Purchase drivers and success criteria Make up of device fleet EMM used (if any) Business critical apps defined Purchase drivers/success criteria)
RecordTypeId = 012b0000000sdVV
Status = Not Started
Subject = 'Activation meeting'
WhatId = {!var_DepID} (a42b0000000j37s)
WhoId = {!var_DepOwner} (005b0000004dk9s)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Name ID: id value of incorrect type: 005b0000004dk9sAAA. For details, see API Exceptions.
Best Answer chosen by Priscila Renwick
Saravana Muthu 8Saravana Muthu 8
Hi,

In the flow you are setting setting the who id with the user id.

That is the place it's causing the error.You need to set this to assigned to.

Don't forget to mark your thread as 'SOLVED' with the answer that best helps you

Thanks,
Sarav
Sweet Potato Tec

All Answers

Saravana Muthu 8Saravana Muthu 8
Hi,

In the flow you are setting setting the who id with the user id.

That is the place it's causing the error.You need to set this to assigned to.

Don't forget to mark your thread as 'SOLVED' with the answer that best helps you

Thanks,
Sarav
Sweet Potato Tec
This was selected as the best answer
Priscila RenwickPriscila Renwick
Thanks Sarav!
נעמי גלינרטנעמי גלינרט

Hey,
I'm trying to create a FLOW that creates a new record in the EVENT object
When I select assigned to it automatically registers me WONERID
When I insert a user ID into it, it works fine
But when I enter a public log id it gives an error.
In the record itself, it is possible to select this field if you want users or logs - maybe it has something to do with it?
In any case I would be very happy for your help
Thank you

Saravana Muthu 8Saravana Muthu 8
Hi,

Could you please let me know the error message you received?

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
Error element eventToMeet (FlowRecordCreate).
This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Related To ID: id value of incorrect type: a033M000002ZutsQAC. You can look up ExceptionCode values in the SOAP API Developer Guide.

Flow Details
Flow API Name: createEventInCalender
Type: Autolaunched Flow
Version: 18
Status: Inactive
Org: מימוש (00D3M0000008l7W)

Flow Interview Details
Interview Label: יצירת אירוע ביומן הנפגשת ובעיר 10:11 29/12/2021
Interview GUID: 400a394b88680001e4422f4c78317e052bb8b-159b
Current User: נעמי גלינרט (0054I000005VJhJ)
Start time: 10:11 29/12/2021
Duration: 0 seconds

How the Interview Started
נעמי גלינרט (0054I000005VJhJ) started the flow interview.
API Version for Running the Flow: 53
Some of this flow's variables were set when the interview started.
Meet = AudienceReceptions__c (a0v3M000000sZtRQAU)

CREATE RECORDS: ארוע לנפגשת
Create one Event record where:
EndDateTime = {!Meet.endMeet__c} (12:45 08/12/2021)
StartDateTime = {!Meet.startMeet__c} (12:00 08/12/2021)
Subject = Meeting
WhatId = {!Meet.BranchName__r.Id} (a033M000002ZutsQAC)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Related To ID: id value of incorrect type: a033M000002ZutsQAC. You can look up ExceptionCode values in the SOAP API Developer Guide.

Transaction Rolled Back
Because an error occurred, any records that the flow was ready to create, update, or delete weren’t committed to the database.

Salesforce Error ID: 1875731192-93311 (-238783498)
Saravana Muthu 8Saravana Muthu 8
Hi,

Thank you. Can you confirm if the 'Allow Activities' on the custom object 'Branch' has been enabled? Please see the screenshot below,

User-added image

If not, please enable and then try to test this. Please let me know if you are facing the issue.

Thanks,
Sarav
Sweet Potato Tec

 
נעמי גלינרטנעמי גלינרט
Thanks
I enabled the Allow Activities
But that did not solve my problem.
Sorry
I really do not know what to do.
How do you link an event to a public calendar?
נעמי גלינרטנעמי גלינרט
User-added image
נעמי גלינרטנעמי גלינרט
I want to allow as in the picture
Its default is users
Saravana Muthu 8Saravana Muthu 8
Hi,

Sorry i cannot see the full screenshot. Are you still facing the same error ?

I think if you create an event and assigned to an user that will show it in the calendar.

Could you please explain what you are trying to achieve?

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
I'm trying to link an event to a public diary.
In flow in creating a record I select an event object
This object has a "assigned to" field to which I want to link a public journal
The calendars are created in Public Calendars and Resources
I was able to link to an employee's log by entering a user id
The question is how do I link the event to one of the public.
thenk.
Saravana Muthu 8Saravana Muthu 8
Hi,

Thanks for the clarification.

You can just insert an event in the flow with the below fields,
  1. Subject - As en example 'Meeting'
  2. Start & End Dates - Today's Date
  3. Assigned to - User ID
  4. Related to ID - Record ID

This will show the event in the user calendar that has been assigned in point 3. Please see the screenshot below,

Event Page:

User-added image

Calendar Page:
User-added image

Process Builder Create Record:

User-added image


Hope this is clear but please let me know if you have any questions.

Thanks,
Sarav
Sweet Potato Tec


 

נעמי גלינרטנעמי גלינרט

I'm sorry but it does not help me.
I want to link to a public diary not to a user.
I mean link to a diary and not through a user
And besides, I work in lightning

Saravana Muthu 8Saravana Muthu 8
Also, you can just use the ID of the calendar in the assigned to set the event in a public calendar. Please see the screenshot below,

User-added image

Hope this helps.

Thanks,
Sarav
Sweet Potato Tec


 
Saravana Muthu 8Saravana Muthu 8
Hi,

If you use the 'Calendar ID' in the assigned field this will work.

Can you modify the flow to update the assigned to with Calendar ID rather than user ID like in the last thread screenshot please and see if it's working?

Thanks,
Sarav
Sweet Potato Tec. 
נעמי גלינרטנעמי גלינרט
Excellent
Just how do I get the log ID?
Saravana Muthu 8Saravana Muthu 8
Hi,
  1. Goto Setup--> Public Calendar and Resources.
  2. Click on the public calendar you have created.
  3. From the URL there is an ID that starts with '023. Please look at the URL below for example,

https://sarav2021-dev-ed.lightning.force.com/lightning/setup/Calendars/page?address=%2F0237F000004vq7M

0237F000004vq7M is the calendar ID

Hope this helps.

Thanks,
Sarav
Sweet Potato Tec

נעמי גלינרטנעמי גלינרט
Thank you very much it helped me a lot and gave the best result.
But I need to get the ID dynamically.
Depends on which log the user chooses.
The big problem is that I can not do a lookup on the logs
Because they are not an object.
Do you have any advice for me?
Saravana Muthu 8Saravana Muthu 8
Hi,

Glad that it helped.

I think you can create a formula text field in the Event object which populate the ID dynamically and use the formula field in the flow.

As an example,
  1. If Event Subject = Meeting then use Meeting Calendar ID.
  2. If Event Subject = Conference then use Conference Calendar ID.
Hope this helps.

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
The process is as follows:
The user of another object enters the calendar to which he wants to create an event.
After selecting OK in the "Approved" field
The FLOW starts working - its purpose is to create an event in the log that the user has selected.

So I do not understand how I can save the ID.

thenks!
Saravana Muthu 8Saravana Muthu 8
Just to be sure, I have look at the error you sent before,

CREATE RECORDS: ארוע לנפגשת
Create one Event record where:
EndDateTime = {!Meet.endMeet__c} (12:45 08/12/2021)
StartDateTime = {!Meet.startMeet__c} (12:00 08/12/2021)
Subject = Meeting
WhatId = {!Meet.BranchName__r.Id} (a033M000002ZutsQAC)
Result
Failed to create record.


Is the flow start working when you create a record in the Branch__c custom object and save it?

Thanks,
Sarav
Sweet Potato Tec
Saravana Muthu 8Saravana Muthu 8
Maybe you can create a FF field in the Branch__c object and use the FF field in the Assigned To field in the flow.
Saravana Muthu 8Saravana Muthu 8
I think another workaround would be create a picklist with list of calendar name,
  1. Meeting
  2. Conference
and let the user select the calendar using this picklist field on Branch object and create another FF field to populate the ID.

Finally use that in the flow 'Assigned to' field. But, you need to maintain the picklist, FF field & flow when any new calendar is added.

Hope I am clear this time.

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
HI.
Apparently I was not clear.

I have an object called "Audience Receipts"
This item has the "Branch" "Employee" and "OK" fields
important to emphasize:
The object branch is an object whose names overlap with the names of the public logs.
Meaning that if the user selected "Jerusalem" in the branch
I want the event to be created in a public diary "Jerusalem".

When I mark V in the "OK" field
I want the flow to create an event for me in both the employee log and the log named after the branch name.

The idea of another FF field is great
only
I did not understand how to enter the log ID, how will I know it?
Saravana Muthu 8Saravana Muthu 8
Hi,

Please pull the 'Branch Name' in the Audience Receipts object and depend on the Branch Name create a FF Field in the Audience Receipts.

As an example,
  1. If the Branch Name is Jeruselam dynamically populate the Jerusalem Calendar ID.
  2. If the Branch Name is United Kingdom populate the United Kingdom Calendar ID.
Finally, in the flow check if the Audience Receipts OK field is approved then create an event with the below fields,
  • Start Date
  • End Date
  • Assigned to - The FF field from the Audience Receipts object.
  • Related to - Branch Name from Audience Receipts object.

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
That's exactly what I need!
Excellent!
Thanks!
But again where will I get the log ID ???
Saravana Muthu 8Saravana Muthu 8
Could you please explain the log ID?

Do you mean the record of the Event or the calendar ID ?

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
To the calender ID
When I asked you earlier how I would take the ID
You registered me to take it from the URL.
But in a dynamic way how do you get it?
Saravana Muthu 8Saravana Muthu 8
Hi,

Please create a formula text field in the 'Audience Receipts' object like below,
 
CASE( Branch__r.Name , "Jeruselam" ,"0237F000004vq7M", "United Kingdom", "0237F000004vqDU", "")

Please change the ID's with your calendar ID's. This will dynamically populate the ID and you can use this field in the flow for Assigned to field.

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
But I have a lot of diaries
It will be lots and lots of lines !!
And what happens if they add another log that will require another line to be added to the field?
Saravana Muthu 8Saravana Muthu 8
Yes, you need to add each log into the formula field when you add a new diary.
נעמי גלינרטנעמי גלינרט
Thank you for your time
It gave me a lot
נעמי גלינרטנעמי גלינרט
Hey,
How can I ask a new question?
Saravana Muthu 8Saravana Muthu 8
Hi,

Please let me know your question i will be happy to help!
נעמי גלינרטנעמי גלינרט
Thank you,
My question is how do I allow each team leader to see all the records that belong only to his team

All main team with the role of Tik Team Leader
And the rest of the employees are in the role of Tik Manager
Saravana Muthu 8Saravana Muthu 8
The event object does not support sharing rules 

​​​​​​So you need need write sharing rules in the object that's associated to the event record record.
נעמי גלינרטנעמי גלינרט
No,
My question is about other objects whether standard or custom
Not on an event object
Saravana Muthu 8Saravana Muthu 8

Yes, you can set the OWD as Private on the object and then create a sharing rule to share the records based on role criteria,

As an example,

  1. Share the records that are owned by Tik Team Leader with Tik Team Leader - This will share the records with the same team.
  2. Share the records that are owned by Tik Team Leader with Tik Manager - This will share the records with the manager.


Thanks,
Sarav
Sweet Potato Tec
 

נעמי גלינרטנעמי גלינרט
Excellent
Just how I do it
נעמי גלינרטנעמי גלינרט
??
Saravana Muthu 8Saravana Muthu 8
Please follow the below steps to create sharing rule,
  1. Goto Setup--> Sharing Settings.
  2. Click New on the relevant object and select the Role (Tik Team Leader) in step 3 & step 4 in the below screenshot. Select Read/Write in Step 5.
  3. Then create another sharing rule then share the Tik Team Leader Role record with Tik Manager.
User-added image

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
thank you for your time,

I will describe a case and I would love to know how to do it
I have an object called "presence"
There is one employee (the principal) who creates records accordingly.
The owner remains the principal
There is a field called "employee name" which links the record to the employee herself.
I want every team leader to be able to see the records in the "Employee Name" field showing the name of an employee who is under it.

There is a possibility?
Saravana Muthu 8Saravana Muthu 8
I think you can create a sharing rule in the 'Presence' object using the 'Employee Name' as the criteria and share it with the relevant roles as I mentioned earlier in the screenshot.
  1. If the employee name is X then share with Team Leader 1.
  2. If the employee name is Y then share with Team Leader 2.
נעמי גלינרטנעמי גלינרט
Thank you
נעמי גלינרטנעמי גלינרט
Is it possible to change that a same role will not be able to see the records of employees with a role under it?
Saravana Muthu 8Saravana Muthu 8
Hi,

If you set the OWD for the presence object as Private and create the sharing rule to share the records to a role. Then only the users assigned with that role can access the records.

No users below the role can access it.

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט

Did not work out for me. Sorry
In sharing settings in the presence object I changed it to be private
When I log in as a team leader's user
She can see all the records of "Tik Managers"
(Team leader is in Role over Tik manager)

why?

Saravana Muthu 8Saravana Muthu 8
Could you please share me the screenshot of the sharing rules created ?

Thanks,
נעמי גלינרטנעמי גלינרט
I did not create any sharing rules
I just changed the object to private
What to write in sharing rules?
Can you sign me up?
I want every employee to see only his records!
And even that there are workers under it.
Saravana Muthu 8Saravana Muthu 8
Hi,

Please follow the below steps to write sharing rule,
  1. Goto Setup-->Sharing Setting.
  2. Select Presence Object in the drop-down
  3. Click New to writing the sharing rule.
    1. If the employee's name is X then share with Team Leader 1.
    2. If the employee's name is Y then share with Team Leader 2.
User-added image

Also please make sure the profile does not have 'View All' & 'Modify All' permission.

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
No,
I do not want to share a team leader in the records of the employees under him
I want the team leader to see his own only
A portfolio manager will see his own
And so it is with all the employees of the company
Each one his own only !.
Saravana Muthu 8Saravana Muthu 8
If that's the case changing OWD to private will work but make sure the profile do not have view all modify all permission.
נעמי גלינרטנעמי גלינרט
I went through all the Permission Sets
And I do not see any permission for employees to see everything.
Is there another way to solve the problem?
נעמי גלינרטנעמי גלינרט
Who is stronger
Sharing Settings
Or role?
Saravana Muthu 8Saravana Muthu 8
Hi,

If the sharing settings is private and there are no sharing rule then only the owner can see the record unless the profile has view all modify all permission.

If sharing settings is private and profile has view all modify all then all the records were visible to the use.
נעמי גלינרטנעמי גלינרט

"unless the profile has view all modify all permission"

How can I check it?

 

Saravana Muthu 8Saravana Muthu 8
Please goto setup users and find the user.

When you are in the user detail page there should be field called profile, click on it and there you can look at the permission for presence object.
נעמי גלינרטנעמי גלינרט
Team leader profile
In the presence object is marked V only in reading
Saravana Muthu 8Saravana Muthu 8
Sorry, could you please provide me a screenshot to understand this better ?
נעמי גלינרטנעמי גלינרט

User-added image
 

From the profile of a team leader

Saravana Muthu 8Saravana Muthu 8
Are there any permission set assigned to this user which has view all modify all permission in the presence object ?
Saravana Muthu 8Saravana Muthu 8
Please have a look at this thread for clear explanation,

https://developer.salesforce.com/forums/?id=9060G000000I94QQAS

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
In the test of
setup -> users -> Permission Sets
I did not see.
נעמי גלינרטנעמי גלינרט
Thank you so much for the link
The problem was that the V in "Grant Access Using Hierarchies"
Not canceled.
That’s why a delicate team leader saw all the records of the employees under him

Thanks so much for all the help
נעמי גלינרטנעמי גלינרט
a question
In the profile-level permissions, it is possible to indicate on each of the objects whether there is a possibility of reading or editing, deleting, etc.
And there is also an option in sharing setting to decide whether the object will be private for read only or read and edit
What is the difference between them?
When is each of them used?
 
Saravana Muthu 8Saravana Muthu 8
Ok pls read this thread for better understanding,

https://developer.salesforce.com/forums/?id=9060G000000UUa0QAG

Thanks,
Sarav
Sweet Potato Tec
נעמי גלינרטנעמי גלינרט
Thanks,
To implement Salesforce,
What topics would you recommend to know well?
Saravana Muthu 8Saravana Muthu 8
Basically Salesforce is like a ocean but as a beginner I would recommend the below topics as part of the configuration,
  1. Objects and Fields
  2. Profile and Permission Set
  3. Roles and Sharing rules.
  4. Workflows, Validation Rules and Flows
  5. Approval process.
Thanks,
Sarav
Sweet Potato Tec