Skip to content

A read-only custom field's underlying script generates a message that needs to be shown in the current user's language, but passing #USER_LANGUAGE# as a parameter to the script only returns the field's label, not an actual language value the script logic can use.

Answer

Call Fnd_Session_API.Get_Language directly inside the custom field's PL/SQL script to get the current user's language as an ISO code — rather than relying on the #USER_LANGUAGE# substitution variable (which is meant for prompt/label-level substitution, not for driving logic inside a read-only field's own script). Get_Language returns the correct ISO code for the session's actual active language, which the script can then use to pick the right translated message text.

← Browse Integrations and APIs questions