Skip to main content
amerayanaa709622
September 21, 2025
Solved

Syntax error. Details: Cannot create an identifier with zero length key

  • September 21, 2025
  • 3 replies
  • 0 views

Hi everyone,

I’m following a Step by Step #10 tutorial to create a related action for my record type. I configured the Create New Related Action dialog as shown in the attached screenshot, but when I test it, I get this error:

Expression evaluation error: Syntax error. Details: Cannot create an identifier with zero length key

I’ve already added a Key value, but the error still appears. I suspect it may be related to the Context expression, but I’m not sure what exactly is wrong.

Has anyone faced this issue before or can point out what I might be missing? Any guidance would be greatly appreciated!

Thanks in advance [emoticon:4baf9c67c1b843c6b4ddedea33023652]

Best answer by shubhama926776

In Context expression, the issue is with the syntax. You're using recordType! and you already referred fields using record, Recommend remove recordType! from line number 4,5 & 6.
You're already inside the record type constructor recordType!NA2AMA.Maintenance(), so you just need the field names directly, not the full record type reference again.

3 replies

shubhama926776
September 22, 2025

In Context expression, the issue is with the syntax. You're using recordType! and you already referred fields using record, Recommend remove recordType! from line number 4,5 & 6.
You're already inside the record type constructor recordType!NA2AMA.Maintenance(), so you just need the field names directly, not the full record type reference again.

gayatria0439
October 17, 2025

Hi [mention:c8d5670551484226b190213f0b4411f9:e9ed411860ed4f2ba0265705b8793d05] , You are trying to construct the record while writing a code like recordName(), so while doing that, you need to include only the fields of the record. You can easily identify the issue yourself because it clearly shows 'recordType!' in the code. Just remove that and mention only the fields of that particular record.

sreekanthb075608
October 18, 2025

Hi amerayanaa709622,

This error usually happens when you use recordType! in your field names inside the record constructor. Just use the field names by themselves—no recordType! needed. So in your Context expression, remove recordType! from those lines and make sure all required fields have values (not blank).

You’re following the right steps! If you’re still getting stuck, share your latest code and we’ll help you fix it. Good luck.