Changing the current value of sequence in a tenant's sequence collection

The following shows how to change a tenant's sequence value in the tenant's sequence collection using the sequence as a key:

assign
  sequence = service:GetSequence("OrderSeq")
  tenant   = service:GetTenant("ACME")
  tenant:SequenceValues:Get(sequence):CurrentValue = 2001. 

service:UpdateTenant(tenant).

See also: