Monday, 8 June 2015

Oracle Apps: fnd_profile.value('ORG_ID') returns null

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:

"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").

Reference: 
After Patch 8222387 Why Does Fnd_profile.Value('Org_id') Return No Value (Doc ID 784279.1)
Conc Programs Using Parameter Fnd_profile.Value(Org_id) Get Apps-Fnd-01436 (Doc ID 784489.1)


Feel free to point out if anything is missing/wrong in this blog.

1 comment:

  1. Hi Anoop,

    How can we read the current Responsibility name in OAF page.
    Can we read using any profile option using OA Personalization?

    ReplyDelete