Abinnaya
Abinnaya

Reputation: 223

Length of character should not cross 4000 in apex validation

I have an item :p1_name in apex, here we can enter only 4000 character, if the limit crossed then the error should trigger from validation that the limit exceeds 4000.

here i have used the below code in validation but its not working.

if length(P95_SLACK_ADHOC_USER_REQUEST)>4000 then
   return false;
else
   return true;
end if;

But its not working

Upvotes: 0

Views: 1138

Answers (1)

Littlefoot
Littlefoot

Reputation: 143063

If this is code you used, then item name lacks in colon, i.e. should be

:P95_SLACK_ADHOC_USER_REQUEST

Upvotes: 2

Related Questions