Skip to main content

Hi All,

I have created a action in the projection and I want that action to be called as a PATCH Rest end point. But it only allows POST. is there a way to declare customized PATCH/DELETE methods in the projection.
 

 

Hi Chamari, According the spec Patch and Delete requests are done against a resource. So there is no meaning in performing an Patch or Delete against an action. Instead try doing a Patch request against the entity set.


Hi Kosala,
 

Thank you for the reply. We need that operation for a structure where it has parent - child relationship and should perform the Create/Update for both “entity” in a single call.
If I use virtual or entity I have to use 2 calls for CRUD , one for parent and one for child.

Thanks!


Hi Chamari,

If I understand your requirements correctly, you need to create both parent and child records in a single call for an entity, correct?

In that case, I believe you can utilize the nestedwithcrud functionality. You can define the structure as shown below and then pass the structure as a parameter to the action. Subsequently, in the PLSVC layer, you will receive some generated procedures to create the entity. For example: Create_Some_Struct_Rec___(rec_ Some_Struct_Rec).

action CreateRecord{
initialcheck none;
parameter Param1 Structure(SomeStruct);
}

structure SomeStruct using SomeEntity{
nestedwithcrud {
crud = Create;
}
}

 

Alternatively, you can use a batch request with a Change Set. Please refer to the Batch Requests section in the Technical Documentation for IFS Cloud.


Hi Kosala,

I have same kind of design as you suggested. But I need single action end point which allows PATCH. May be I can ask the other party of the integration to use POST for both create and update records. Thank you very much for the support. 😊


Reply