Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.89 KB

retrieve-valid-status-transitions.md

File metadata and controls

50 lines (34 loc) · 1.89 KB
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
developer
JimDaly
phecke

Sample: Retrieve valid status transitions

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

How to run this sample

[!includecc-how-to-run-samples]

What this sample does

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.

How this sample works

In order to simulate the scenario described in What this sample does, the sample will do the following:

Setup

  1. Checks for the current version of the org.
  2. The MetadataFilterExpression method checks for table definitions.

Demonstrate

  1. The MetadataFilterExpression method retrieves the status options for the Incident table.
  2. The RetrieveMetadataChangeRequest method retrieves the metadata.
  3. The GetValidStatusOptions method gets the valid status transitions for each status option.

Clean up

This sample creates no records. No clean up is required.

[!INCLUDEfooter-include]