Using Count Function in Custom Object
Hello,
I have an inquiry about using the "Count" function in the expression builder for a custom object. The case is explained below: I have created a custom object named "APP_POC" with a few fields, one of which is named "Sequence" and is of type "number".
We want to default the value of this field and use it as a separate sequence when the record is created.
I tried to write the below script (in default expression) to generate the sequence:
"if(OBJECTNAME.count('FIELDNAME') == 0)
return 1
else
return nvl(OBJECTNAME.max('FIELDNAME'),0) + 1"
but when I entered the name of the custom object, I got an error message saying that it was not identified. When I tried to select it from the function form, I couldn't find it. Can you please help me with this issue?