cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
badcat330
New Member

SQL error while deleting solution

Hi,

I got strange SQL error after I tried to delete solution. In logs I found that it is because it can't find column, which have type File. I checked this field and it working absolutely correct in app. Also I looked for sql error code and couldn't find any information about it in current context. Screens with error below. In log I found error message with text: Invalid column name 'new_Fail'. Also there are no error code only '-'. And 'newFail' is existing field, with type file.

 

Screenshot 2020-07-02 at 13.45.20.png

 

I'm lost as to how I can solve this. 
Does anyone have any suggestions?

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
rohsh354
Community Support
Community Support

Hello,

 

This can happen due to stale cascade-delete SQL statements, which are stored as dynamic commands in the database. Apparently, when an entity schema is modified from one solution version to another, not all SQL scripts are getting properly re-generated. Here are these steps in detail:

 

1. In the Customize section find the [Account] entity (use the entity that is being affected)

2. Add a 1:N relationship from Account to Account (I named it new_account_account_test)

3. "Save and Close"

4. "Publish All Customizations"

5. Delete the newly added relationship (new_account_account_test)

6. "Publish All Customizations"

 

If above steps does not help, please consider opening a Support Ticket with Microsoft Support to check this further.

 

Hope this helps !

 

 

 

View solution in original post

1 REPLY 1
rohsh354
Community Support
Community Support

Hello,

 

This can happen due to stale cascade-delete SQL statements, which are stored as dynamic commands in the database. Apparently, when an entity schema is modified from one solution version to another, not all SQL scripts are getting properly re-generated. Here are these steps in detail:

 

1. In the Customize section find the [Account] entity (use the entity that is being affected)

2. Add a 1:N relationship from Account to Account (I named it new_account_account_test)

3. "Save and Close"

4. "Publish All Customizations"

5. Delete the newly added relationship (new_account_account_test)

6. "Publish All Customizations"

 

If above steps does not help, please consider opening a Support Ticket with Microsoft Support to check this further.

 

Hope this helps !

 

 

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,221)