This is preview!
"Thanks for your email, please note that the custom function will not work for the custom layout it would work only in the standard layout.
And the execution status will not be shown as failed, since the execution will process but due to inavailability of the field in standard layout it will arrive. The error or failure would be thrown only if there is any issue with the code."
"We supported the custom function for custom layouts now only . So kindly use the below for the fields in custom layouts.
"""""1234567890 - replace by that custom layoutId"""""
Note : Custom functions for custom layout will work only for create and update records api."