Skip to main content

Hi,

As Objkey is a single column alternative record identifier that applies to any IFS object (as long as the Rowkey is activated), it was common in Apps8, 9, 10 to use this attribute in integrations to tie objects from external systems to IFS objects.

However, it looks like in IFS Cloud the standard APIs do not return the Objkey attribute.

For instance, looking at the OnHoldCauseHandling and OnHoldCauseEntity APIs, none of them return the Objkey when a record is created/POST or retrieved/GET. At least I can`t see it in the API documentation or calling the APIs from Postman.

Also, in Oracle PL/SQL Package APIs, IFS provided methods bound per Id and per Objkey, which was very useful in these integrations where Objkey was being used as a reference. In IFS Cloud the Objkey option does not exists/is not exposed in the Rest API, there is typically the Id method but not the Objkey one.

Also, I can see that there is a keyref field that returns the whole key in one field, but that is not a persisted field neither can be indexed, so I don`t believe this is a good alternative for integrations.

 

Is there a way of enabling IFS to expose the Objkey attribute in the Rest APIs (without customizing the object) and somehow get the methods bound by Objkey as well?

 

Regards,

 

Anyone any idea? I’m facing exactly the same issue, one entity holds an Objkey to the EquipmentObject, but I didn’t find a way to retrieve the equipment’s key.


@Alexander Heinze,

We’ve faced the same issue (frustratingly). There is already a separate ticket from us regarding this issue:

Return Objkey attribute by default for any EntitySet | IFS Community

 

For now, you could create a custom attribute → read only field on the entity → Expression → v.Objkey

This way you get the objkey passed as Cf_Objkey.

Please note though, this does not get the best performance.


Hi ​@stedile.jefferson, ​@Alexander Heinze,

I ran into the same challenge and managed to find a workaround that might help you retrieve the ObjKey without customizing the object. It’s a bit unconventional, but it works.

I was testing the creation of Notes on the InstantInvoice screen via API, and here’s how I extracted the ObjKey:

  • First, retrieve your Invoice ID (or the relevant ID for your object).

  • Then, perform a POST to this endpoint: https://hostname/main/ifsapplications/projection/v1/InstantInvoiceHandling.svc/NotesInfoVirtuals In the payload, include: "KeyRef": "COMPANY=TEST^INVOICE_ID=102560^"

  • Upon a successful POST, the response includes both the ObjKey and keyref:

{
"@odata.context": "https://hostname/main/ifsapplications/projection/v1/InstantInvoiceHandling.svc/$metadata#NotesInfoVirtuals/$entity",
"@odata.etag": "W/\"Vy8iM0YzNTc5NDQwOTYwNjVCREUwNjUwMDAwMDAwMDEi\"",
"luname": "NotesInfoVirtual",
"ObjKey": "3F357944096065BDE065000000000001",
"keyref": "3F357944096065BDE065000000000001"
}
  • You can now use the ObjKey in subsequent API calls where it’s accepted.

While this isn’t officially documented as a standard method, it does expose the ObjKey without needing to customize the projection. Hopefully this helps bridge the gap until IFS provides more direct support for ObjKey-bound methods in REST.