Question

How to invoke delete record on page ?

Hello Team,

 

I have to implement in edit page code some logic to delete record. I can't find any example in repository (by analogies to this.save(), eg. this.delete()).

 

Any suggestion ?

 

Regards,

Marcin

Like 0

Like

3 comments
Best reply

Marcin Kott,

 

Hello,

 

The only possible way I see is to use the deleteRecords function that is a part of BaseDataView (called in the onActiveRowAction method).

So you will need to include the BaseDataView module into your dialog box logic and call the deleteRecords function in case the "No" button is pressed.

 

Best regards,

Oscar

Hi Marcin,

 

Please describe your business task and explain why the standard delete option is not an option in our case?

 

Thank you in advance!

 

Best regards,

Oscar

Hi Oscar,

 

The business case is that we have related objects Opportunity->Deliveries->Opportunity Product and requirement is to do not allow user to create empty Deliveries without products.

 

My solution is to validate onSaved method Deliveries and if there is not product related popup dialog box.

As a "Yes" response of dialog box new page Opportunity Product (in add mode) will be open if "No" response Deliveries record will be removed.

 

Regards,

Marcin

Marcin Kott,

 

Hello,

 

The only possible way I see is to use the deleteRecords function that is a part of BaseDataView (called in the onActiveRowAction method).

So you will need to include the BaseDataView module into your dialog box logic and call the deleteRecords function in case the "No" button is pressed.

 

Best regards,

Oscar

Show all comments