Skip to main content
Question

Action created in Projection does not allow PATCH


ChamariJ
Sidekick (Partner)
Forum|alt.badge.img+4

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.
 

 

4 replies

Forum|alt.badge.img+4
  • Do Gooder (Employee)
  • 16 replies
  • April 4, 2024

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.


ChamariJ
Sidekick (Partner)
Forum|alt.badge.img+4
  • Author
  • Sidekick (Partner)
  • 6 replies
  • April 4, 2024

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!


Forum|alt.badge.img+4
  • Do Gooder (Employee)
  • 16 replies
  • April 4, 2024

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.


ChamariJ
Sidekick (Partner)
Forum|alt.badge.img+4
  • Author
  • Sidekick (Partner)
  • 6 replies
  • April 5, 2024

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. 😊


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings