Rock Mobile Docs

Please login to access all of the features of the Community Site.

CreateEntitySetAndNavigate

Mobile6.0

This command is pretty complex. It does two things... First it generates an Entity Set based on the provided parameters and then performs a Navigation command with an appended query string of the entity set value.

Warning

This command calls POST api/EntitySets/CreateFromItems/{entityTypeGuid}, which needs Edit permission on that action of the EntitySets REST controller. You set it under Admin Tools > Security > REST Controllers. Starting with Core v16, grant it to the 'RSR - Mobile Application Users' role. Earlier versions use 'All Authenticated Users'. Without it, people see "You are not authorized to generate an entity set." and the app doesn't navigate.

Properties

PropertyTypeDescription
TimeToExpireintThe amount of time (in minutes) before the entity set expires.
QueryStringParameterKeystringThe key associated with the newly generated Entity Set that will be passed along through the query string. Defaults to EntitySetGuid.
EntityTypeGuidGuidThe Guid of the type of entity this entity set is in relation to.
EntityItemGuidsList<string>A list of the string Guid entity set items. You should only include entities that are of the same type provided by the EntityTypeGuid.
NavigateCommandCommandReferenceThe navigation command to execute with the new entity set query string parameter.
<Button Text="Create Entity Set And Navigate"
    Command="{Binding CreateEntitySetAndNavigate}">
    <Button.CommandParameter>
        <Rock:CreateEntitySetAndNavigateParameters EntityTypeGuid="72657ED8-D16E-492E-AC12-144C5E7567E7">
            <Rock:CreateEntitySetAndNavigateParameters.EntityItemGuids>
                <x:String>66D0FD8B-BFA0-41EA-8DAD-000040D0890D</x:String>
                <x:String>EE161CC8-5C25-4BA2-9E41-0000C8B80A39</x:String>
            </Rock:CreateEntitySetAndNavigateParameters.EntityItemGuids>
            <Rock:CreateEntitySetAndNavigateParameters.NavigateCommand>
                <Rock:CommandReference Command="{Binding PushPage}"
                    CommandParameter="f0ef45ac-4eb8-4ad1-b817-408d7d7fe0fc" />
            </Rock:CreateEntitySetAndNavigateParameters.NavigateCommand>
        </Rock:CreateEntitySetAndNavigateParameters>
    </Button.CommandParameter>
</Button>
  • SetContext sets an entity context value for the page.