microsoft / coe-starter-kit

Other
748 stars 220 forks source link

[CoE Starter Kit - BUG] Erro CLEANUP - Admin | Sync Template v4 (Check Deleted) #8295

Closed minobrega closed 4 months ago

minobrega commented 5 months ago

Does this bug already exist in our backlog?

Describe the issue

Hello,

Please, there is an error when running the CLEANUP flow - Admin | Sync Template v4 (Check Deleted), displays the error message below, says that the app cannot be deleted as there is a task in progress, but it has been displaying this error for over 1 month as shown in the screenshots below. I tried to delete the applications manually in the dataverse, but it won't let me delete them. Can you guide me on what to do in this case, I think that deleting the row of these 2 apps in the dataverse will solve the problem, however when trying to delete it manually in the dataverse it shows the same error message.

Erro: This entity is currently being deleted as part of an asynchronous cascade delete job. Please wait for the asynchronous job to complete before attempting to delete this entity again. You may look up the status of this job by searching for the following AsyncJobName in the system jobs view. (EntityId: a4556abc-fc7e..., EntityName: admin_App, AsyncJobName: Cascade Delete:[admin_App]-[a4556abc-fc....], AsyncJobId: c551b1b4-f79...., AsyncDeleteOperationId: 6553a11a-c2....)

Erro CoE

Erro CoE2

Erro CoE3

Erro CoE versao

Expected Behavior

The CLEANUP Flow - Admin | Sync model v4 (check deleted) should run without errors to run child flows also without errors

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.29

What app or flow are you having the issue with?

CLEANUP - Admin | Sync Template v4 (Check Deleted)

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

No response

Anything else?

No response

AB#3268

Jenefer-Monroe commented 5 months ago

Oh wow, thats a strange issue! Let's see what type of relationship you have between these tables.

Please go to PowerApps App > Relationships > App Environment > Edit > Advanced Options. Share what you have for these settings. image

minobrega commented 5 months ago

Follow the data as requested

Erro CoE 4

minobrega commented 5 months ago

But as I said, this error is only happening in these two applications that were deleted, I think if you delete them from the dataverse table it will no longer give this error, but when I try to delete them manually from the dataverse table it shows this error.

Erro CoE3

Jenefer-Monroe commented 5 months ago

Unfortunately it appears you've hit some kind of product bug here. We can try a few more things but you may need to contact product support.

Let's go see about this system job its referencing. From the CoE Envt, go to Advanced Settings > Settings > System Jobs image image

From here search by Entity or View, see if you can find the job its referencing.

minobrega commented 5 months ago

Erro CoE5

Erro CoE 6

minobrega commented 5 months ago

Mensagem: Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "admin_AuditLog_AppLookup_admin_App". The conflict occurred in database "db_crmcoresam_20230323_03475413_ef75", table "dbo.admin_AuditLogBase", column 'admin_AppLookup'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547

System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "admin_AuditLog_AppLookup_admin_App". The conflict occurred in database "db_crmcoresam_20230323_03475413_ef75", table "dbo.admin_AuditLogBase", column 'admin_AppLookup'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547 (Fault Detail is equal to Exception details: ErrorCode: 0x80048D21 Message: Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "admin_AuditLog_AppLookup_admin_App". The conflict occurred in database "db_crmcoresam_20230323_03475413_ef75", table "dbo.admin_AuditLogBase", column 'admin_AppLookup'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547 TimeStamp: 2023-12-17T07:17:07.0081912Z

Exception details: ErrorCode: 0x80048D21 Message: Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "admin_AuditLog_AppLookup_admin_App". The conflict occurred in database "db_crmcoresam_20230323_03475413_ef75", table "dbo.admin_AuditLogBase", column 'admin_AppLookup'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547 TimeStamp: 2023-12-17T07:17:07.0081912Z

Exception details: ErrorCode: 0x80040216 ...).

minobrega commented 5 months ago

Jenefer, I did this so I canceled those tasks that were stuck and manually deleted the two applications that the tool was unable to delete from the dataverse, now I put the flow to run again, as soon as I finish I'll let you know if it worked...

Erro CoE 7

Erro CoE 8

ERro CoE 9

Jenefer-Monroe commented 5 months ago

Well done investigating! Please do let me know what you find.

minobrega commented 5 months ago

It worked, it worked Jenefer..

Now the flow ran without errors, I had to cancel that task because it was blocking the flow.

Thanks for your help, thanks to your tip I managed to fix the error.

Erro CoE 10

Erro CoE 11

Jenefer-Monroe commented 5 months ago

Better together! WOOHOO! Have a happy weekend with this off your list :)

Jenefer-Monroe commented 4 months ago

closing out as no further action for starter kit team