FND_PROFILE.value('ORG_ID') will return value only if the 'MO: Operating Unit' is set for the responsibility used.
If you need to get the ORG_ID in a MOAC enabled instance,
use FND_GLOBAL.org_id or MO_GLOBAL.get_current_org_id instead.
From the reference given below:
If you need to get the ORG_ID in a MOAC enabled instance,
use FND_GLOBAL.org_id or MO_GLOBAL.get_current_org_id instead.
From the reference given below:
"For MOAC-enabled instances, FND_PROFILE.VALUE('ORG_ID') will no longer convey the correct org context for a given session. The customer *has to change* all FND_PROFILE.VALUE('ORG_ID') calls to either use MO_GLOBAL.get_current_org_id() (which is highly recommended by the MO Team or FND_GLOBAL.ORG_ID(). Do NOT use FND_PROFILE.VALUE('ORG_ID') for any MOAC-enabled instances."
To get the org_id in OA Framework code:
use appModule.getOADBTransaction().getOrgId() or pageContext.getOrgId().
instead of pageContext.getProfile("ORG_ID").