title | description | ms.date | author | ms.author | ms.reviewer | ms.topic | search.audienceType | contributors | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Sample: Retrieve valid status transitions (Microsoft Dataverse) | Microsoft Docs |
This sample shows how to retrieve valid state transitions. |
04/03/2022 |
mkannapiran |
kamanick |
jdaly |
sample |
|
|
This sample shows how to retrieve valid state transitions regardless of whether custom state transitions have been defined for the table.
[!div class="nextstepaction"] SDK for .NET: Retrieve valid status transitions sample code
[!includecc-how-to-run-samples]
The GetValidStatusOptions
method is intended to be used in a scenario where it contains data that returns valid status option transitions regardless of whether state transitions are enabled for the table.
In order to simulate the scenario described in What this sample does, the sample will do the following:
- Checks for the current version of the org.
- The
MetadataFilterExpression
method checks for table definitions.
- The
MetadataFilterExpression
method retrieves the status options for theIncident
table. - The
RetrieveMetadataChangeRequest
method retrieves the metadata. - The
GetValidStatusOptions
method gets the valid status transitions for each status option.
This sample creates no records. No clean up is required.
[!INCLUDEfooter-include]