Skip to content

Calling a standard *_API.MODIFY__() procedure (like EXTERNAL_CUST_ORDER_LINE_API.MODIFY__) requires an objid_ and objversion_, but these values can't be found directly on the entity's own base table (only in an _ALL view, or not obviously at all) — how do you determine the right values to pass, and is there a safe way to run this kind of ad-hoc update outside the interactive client?

Answer

For an entity whose objid_/objversion_ aren't obvious from its base _TAB, look at the corresponding _ALL view instead (e.g. EXTERNAL_CUST_ORDER_LINE_ALL) and SELECT the objid and objversion for the specific record, matched by whatever business keys uniquely identify it (like a message ID, catalog number, and line number together) — those looked-up values are what MODIFY__ actually expects, not anything you'd construct yourself. For running this kind of one-off update safely as a background job rather than directly in an interactive session, wrap it using Message_SYS.Construct('UPD') plus Message_SYS.Add_Attribute(msg, 'SQL', your_dynamic_sql_block) and hand it to Transaction_SYS.Deferred_Call with 'Fnd_Event_Action_API.Action_Executeonlinesql' — this is the standard pattern for queuing arbitrary ad-hoc SQL/PLSQL logic to run as a background job rather than executing it inline.

← Browse Developer Studio, deployment, and upgrades questions