Getting an Object's Prref_Id and Prref_Ver
Use the following query to retrieve these values:
select prref_id, prref_ver from cdr_program_refs_v where COMPANY_ID = <your_company_id> and WA_OBJ_ID = <the_adapter_work_area_id> and MASTER_PRREF_OBJ_ID = <the_obj_id_of_the_object> and MASTER_PRREF_OBJ_VER = <the_obj_ver_of_the_object>;
The primary purpose of the Prref ID is to provide an execution context for executable objects contained in complex objects, such as Program instances contained in Report Set or Workflow instances. In these cases, the Master Prref Obj ID is the Object ID of the Report Set or Workflow instance that owns the Program instance.
For consistency, all object instances must have a Prref ID. In the case of object instances located directly in a Work Area, the object's Master Prref Obj ID is the same as its Object ID. For example, the Master Prref ID of a Program instance contained in a Work Area is the same as its Object ID; so if you know its Object ID, you know its Prref ID.
Note:
When you create an object using an API, save its Object ID, which is an output parameter value. You may need the ID to get the object's Prref ID or to create child objects.Parent topic: Retrieving IDs