web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Excel Add-In not publishing a record delete

(1) ShareShare
ReportReport
Posted on by 89

Hi,

I have created a data entity for open in excel functionality. The form grid had all reference fields that are linked to back-end RecIds and only one datasource (the  entity uses this DS), so I had to create virtual fields (unmapped) and utilized the postLoad() method to set them to correct values from other tables. I also used the mapEntityToDataSource() method to set/update the fields correctly on the form upon publishing changes made from the excel sheet.

I am having no issues when I insert a new record in the excel add-in then publish. However, if I try to delete a record in the excel add-in and publish I am receiving the error "The deletion of a row in data set XXX was not published. Error message: 'No resources were found when selecting for update.'".

I suspect that it is the same error as seen in these two forum posts:

https://www.dynamicsuser.net/t/record-deletion-through-import-in-excel/68502

   

But I couldn't get a good solution from these.

Please let me know if you have a solution. I have tried debugging but couldn't find from where this error was getting called. Let me know if I should provide some code snippets.

Thanks!

I have the same question (1)
  • tristansenk99 Profile Picture
    89 on at

    I tried adding the below code as suggested from this forum post: www.dynamicsuser.net/.../68502

    but it doesn't even get hit when I debug and delete a record then try and publish.

    public boolean deleteEntityDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)

       {

           boolean ret;

           ret = next deleteEntityDataSource(_entityCtx, _dataSourceCtx);

           switch (_dataSourceCtx.name())

           {

               case dataEntityDataSourceStr(CE_BudgetBankInquiryRelationShipsEntity, CE_BudgetBankInquiryRelationships):

                   CE_BudgetBankInquiryRelationshipsEntity CE_BudgetBankInquiryRelationshipsEntity = _entityCtx.getEntityRecord();

                   CE_BudgetBankInquiryRelationships CE_BudgetBankInquiryRelationships = _dataSourceCtx.getBuffer();

                   CE_BudgetBankInquiryRelationships.delete();

                   ret = false;

                   break;

           }

           return ret;

       }

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Tristansenk99,

    Does the table have a natural key? Why do you try to use RecIds in your entity as references? These RecIds can be different in multiple environments. Have you verified the entity key of your data entity? Is this matching the list of fields in the primary key with the target table?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans