Skip to Content
1
Jan 30, 2023 at 06:19 PM

Non Draft Fiori Elements beforeSaveExtension not working

304 Views

Hi All,

I implemented a custom Fiori Elements app(Create Goods Receipt) and my backend version is NW BASIS 7.4.

I built my OData based on SADL(consumed basic interface CDS views without annotations) and I wrote all local annotations to support my front end Fiori Elements on BAS.

Now the problem is when I click on Object page Save button existing framework works with Patch Entity and it saves only one item at a time not all the items .

But it should work with all the items in one shot like deepInsert for my requirement, for this I tried using beforeSaveExtension to implement my own code to achieve my requirement but unfortunately beforeSaveExtension never calls but at the same time beforeDeleteExtension triggers not sure why beforeSaveExtension is not triggers.

 this.extensionAPI.getTransactionController().attachAfterSave(this._submitGRObject.bind(this)); 

As a work around for now I am reading data from UI sections and tables and submitting to backend(not a decent way).

Can someone help me why not "beforeSaveExtension" triggers here and my app is not draft enabled.Is there any other best way ?.

Thanks

Rajesh