cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Update operation of Multiple Items using Deep entity method, code based approach

Former Member
7,925

Hello Everyone,

I am aware that create_deep_entity method is generally used for creating deep entities in OData. However , If we need to perform an update operation on multiple items without using $Batch functionality we need to manually implement a code based approach on  create_deep_entity method using extension _*EXT class. How can this be achieved ?Generally this method gets called when we are performing a deep entity operation and the same cannot be applied while doing an update  request on multiple items. Please advice.

Best Regards,

Lakshman.

View Entire Topic
EkanshCapgemini
Active Contributor

Hi Lakshman,

The easiest way would be to have an additional property of flag which contains the operation that you are trying to perform ('C' = Create, 'U' = Update). Now when you hit the POST call with navigation property of your line items, you can check the flag and change your functionality accordingly in the Deep_Insert method.

Let us know if we failed to understand your question in the correct way.

Regards,

Ekansh

Former Member
0 Likes

Ekansh,You're clear on what I have asked. Even I had the same thought , An additional property as an entity .But what would be the best way to update this flag.

You mean in the front end itself we're going to design POST and PUT  URL in such a way that this Flag  parameter is populated based on the operation we perform? Am I Right

EkanshCapgemini
Active Contributor
0 Likes

Yes, you are correct.

JyotiD
Active Participant
0 Likes

My Bad. Already quite a lot happened in discussion, I can see now....