Skip to main content
Question

Object Connection Transformations

  • Nov 2, 2026 11:56 AM UTC
  • 1 reply
  • 45 views

Forum|alt.badge.img

Hi all,

I would like documents attached to a Purchase Order Header or Purchase Requisition Header to also be visible in the Attachment panel of the related Project Definition.

Could anyone explain how the transformation methods should be configured for these Object Connection Transformations? A working example for either scenario would be greatly appreciated.

Thanks in advance!

1 reply

Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • Nov 24, 2026 5:03 PM UTC

Short answer: you need one Object Connection Transformation row per source (Purchase Order Header and Purchase Requisition Header), both with the Project Definition as the target, and in both cases the default column mapping will not be enough, so the Transformation Method has to be your own stored function. A project has many orders, so the function returns the list of order (or requisition) numbers that belong to the project.

Why the default is not enough

The default method is built by mapping the source keys to columns of the target. That works when the target carries the source key, for example a customer order line (target) and the sales part it uses (source). A project does not carry ORDER_NO or REQUISITION_NO, and one project can be linked to many POs and requisitions, so there is nothing to map column to column.

A setup along these lines

  1. Application Base Setup, System Setup, Object Connection Transformations, add a row for the PO.
  2. Target: Project (the Project Definition). Service: the document service, DocReferenceObject. Source: PurchaseOrder.
  3. Editable: Target if users should be able to add new documents on the project itself. None keeps the Attachment panel read-only for these documents, and Source would attach new documents to the PO.
  4. Transformation Method: your own function, entered as package and method, for example Your_Obj_Conn_API.Po_For_Project.
  5. Second row the same way with Source PurchaseRequisition and for example Your_Obj_Conn_API.Req_For_Project.

What the function receives and returns

  • It is a function that returns a string and takes two string parameters, in this order: the target key reference and the service name. For example FUNCTION Po_For_Project (target_key_ref_ IN VARCHAR2, service_name_ IN VARCHAR2) RETURN VARCHAR2.
  • The target key reference is the project key in the usual NAME=value^ form, so you read PROJECT_ID out of it.
  • It returns the source key reference in the same form, for the PO ORDER_NO=1234^, for the requisition REQUISITION_NO=5678^.

The several-projects and several-orders case

  • Going from the project, one project gives many POs, so the function should return one key reference per order, separated with the record separator the standard transformation code uses, rather than just the first one.
  • For the PO, select the distinct ORDER_NO where the project is PROJECT_ID on the order or on its lines. The PO header and the PO lines both carry PROJECT_ID, so decide which one you treat as the project link; lines are the more complete choice if one order covers several projects, and then one PO simply shows up under each of its projects.
  • For the requisition, the project sits on the requisition lines (PURCHASE_REQ_LINE_PART), not on the header, so select the distinct REQUISITION_NO from the lines for the project.
  • Return NULL when the project has none, so nothing is shown.

Things to know

  • The rules are one hop only. A document attached to a PO line will not appear on the project through the header rule, and a rule chain such as line to header to project is not followed.
  • Only active rows are used, so make sure each new row is active.
  • The setup process has a Test Object Connection Transformation step; run it with a project that has a PO and a requisition before you rely on it.

Worth a look: the IFS Cloud documentation for Define Object Connection Transformations and About Object Connection Transformation, and the existing rules on the page that already show an API and method name in the Transformation Method field. The record separator and the exact string type are worth confirming in your release before you code the function.

Are the documents on the PO and requisition headers held as Document Management documents, or as media items? The service on the row would then be the media one instead.

Created with the help of Ask Olive.