You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/restore-deleted-records.md
+9-145Lines changed: 9 additions & 145 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ search.audienceType:
11
11
- developer
12
12
contributors:
13
13
- JimDaly
14
+
- shahzorkhan123
14
15
- TakeN0
15
16
ms.custom: bap-template
16
17
---
@@ -293,7 +294,7 @@ function Restore-AccountRecord {
293
294
294
295
The following errors might occur when restoring records.
295
296
296
-
#### RefCannotBeRestoredRecycleBinNotFound
297
+
#### Restore related records before restoring primary record
297
298
298
299
If some related records whose reference were removed as part of Cascade relationship, no longer exist, the restore operation will fail. To avoid this, always restore the related records not deleted as part of current record, before trying to restore the primary record.
299
300
@@ -303,27 +304,27 @@ If some related records whose reference were removed as part of Cascade relation
303
304
> Message: `Entity with id '<Guid Value>' and logical name '<Entity.LogicalName>' does not exist. We cannot restore the reference '<Referred Primary Key Name>' that must be restored as part of this Restore call. ValueToBeRestored: <Guid Value>, ReferencedEntityName: <Referenced Entity Name>, AttributeName: <Referred Attribute Name>`
304
305
305
306
306
-
#### DuplicateExceptionRestoreRecycleBin
307
+
#### Don't specify primary key values when creating records
307
308
308
-
Donot create records with specific primary keys, otherwise, if the previous record was in deleted state, the new record will prevent the deleted record to be restored.
309
+
It is generally a good practice to always let Dataverse set the primary key when creating a record. If you create a new record that has the same primary key value as a deleted record, the deleted record can't be restored. If you do, you must delete the new record before you can restore the deleted one.
> Message: `Please delete the existing conflicting record '<Entity Platform Name>' with primary key '<Primary Key Name>' and primary key value '<Primary Key Value>' before attempting restore.`
314
315
315
-
#### DuplicateExceptionEntityKeyRestoreRecycleBin
316
+
#### Records with matching alternate key values will block restore
316
317
317
-
Donot create records with similar Alternate Keys that were already deleted, this will prevent previous record was in deleted state to be restored. The new record will need to be deleted before previous record is restored.
318
+
If you create a record that has the same alternate key column values as a deleted record, you can't restore it. If you do, you must delete the new record before you can restore the deleted one.
> Message: `Duplicate entity key preventing restore of record '<Entity Platform Name>' with primary key '<Primary Key Name>' and primary key value '<Primary Key Value>'. See inner exception for entity key details.`
323
324
324
-
#### PicklistValueOutOfRangeRecycleBin
325
+
#### Records using removed Choice options can't restored
325
326
326
-
Do not delete Picklist or Option Set values directly, instead rename them with (deprecated) tag, because it will prevent the records deleted at the time to be restored.
327
+
If you delete an optionset option, and that option was used in a deleted record, you can't restore it because the option is now invalid. Before deleting an option set option, check that no records use that option, including deleted records.
327
328
328
329
> Name: `PicklistValueOutOfRangeRecycleBin`<br />
329
330
> Code: `0x80049949`<br />
@@ -1011,141 +1012,4 @@ The following tables are the result of the query found in [Detect which tables d
1011
1012
`workflowcardconnections`<br />
1012
1013
`workqueue`<br />
1013
1014
:::column-end:::
1014
-
:::row-end:::
1015
-
1016
-
1017
-
1018
-
1019
-
1020
-
1021
-
## REMOVE BEFORE PUBLISHING: Markdown examples to delete when we are done
1022
-
1023
-
Each `##` section has a navigation link at the top of the page. Introduce key capabilities with a section. You may want to use this when you link between articles.
1024
-
1025
-
### Sub section
1026
-
1027
-
Each sub section provides a 'link-able' section of the doc. You may want to use this when you link between articles.
1028
-
1029
-
#### Sub-sub section
1030
-
1031
-
You can divide your sub sections with linkable headings. You shouldn't go deeper than `####` if you can avoid it.
1032
-
1033
-
## Tables
1034
-
1035
-
Please use markdown tables. HTML tables will render, but are not preferred. Try not to use more than three columns.
1036
-
1037
-
1038
-
|Column1 |Column2 |Column3 |
1039
-
|---------|---------|---------|
1040
-
|Row1-1|Row2-1|Row2-1: When adding content to a row, all the content must be in a single line. <br /> If you need to add a break, use `<br />`.|
1041
-
|Row1-2|Row2-2|Row2-2|
1042
-
|Row1-3|Row2-3|Row2-3|
1043
-
|Row1-4|Row2-4|Row2-4|
1044
-
|Row1-5|Row2-5|Row2-5|
1045
-
1046
-
## Images
1047
-
1048
-
Put all your images in the media folder at the same level as the file.
1049
-
1050
-
:::image type="content" source="media/dev-resources-menu.png" alt-text="A screenshot of the developer resources menu in Power Apps.":::
1051
-
1052
-
## Code
1053
-
1054
-
When you include multiple lines of code, use this:
1055
-
1056
-
```csharp
1057
-
// Hello world
1058
-
```
1059
-
1060
-
If you use a word in a sentence to refer to a specific term that shouldn't be localized, surround it with backtick characters: `IObservable`.
1061
-
1062
-
1063
-
1064
-
## Links
1065
-
1066
-
There are several types of links you can use:
1067
-
1068
-
### Local links
1069
-
1070
-
You can link to other articles in the same repo with relative paths: [Search for Dataverse records](search/overview.md) , or [Update and delete table rows using the Web API](webapi/update-delete-entities-using-web-api.md), or [Update and delete table rows using the SDK for .NET](org-service/entity-operations-update-delete.md).
1071
-
1072
-
### Links to sections
1073
-
1074
-
You can add links to headings of other sections of the same document: [Detect which tables do not have recycle bin enabled](#detect-which-tables-do-not-have-recycle-bin-enabled)
1075
-
1076
-
You can link to headings of other sections of a different document: [DeleteMultiple Availability](deletemultiple.md#availability)
1077
-
1078
-
You can link to a section of another document on Microsoft Learn: [Power Platform CLI](/power-platform/developer/cli/introduction)
1079
-
1080
-
> [!NOTE]
1081
-
> If you change the heading (or someone else changes the heading), the link will break. You (or they) will get a build warning when that happens.
1082
-
1083
-
### Other Microsoft Learn articles
1084
-
1085
-
You can link to other articles in different repos by removing `https://learn.microsoft.com/en-us` from the URL. For example: [Microsoft Power Platform developer documentation](/power-platform/developer/).
1086
-
1087
-
### Links to reference articles
1088
-
1089
-
If you want to link to a reference topic for a property, use this pattern: <xref:System.String.Length>, or [String.Length Property](xref:System.String.Length), or [String.IndexOf Method](xref:System.String.IndexOf%2A). After you have added one link, subsequent mentions can just use back ticks: `IndexOf` method.
1090
-
1091
-
The [Learn Authoring Pack](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-authoring-pack) provides a tool to make adding these easier when you are using a local clone of the repo.
1092
-
1093
-
> [!NOTE]
1094
-
> I strongly recommend using VS Code with a local clone of the repo. Happy to give you a demo and help you get set up. [Learn more about using Visual Studio Code to work with our content](/bacx/make-major-changes?branch=main)
0 commit comments