Commands for Setting the Values of Elements

As you specify the sequence of commands in an array of Command objects, when you need to specify the value of an element on a form, you should use Value commands.

To set the value of an element on a form, you should do the following:
  1. Create a Value object.
  2. Specify the value of the element on the form in the Value property of the created Value object.
  3. Specify the element on the form whose value should be set by using the LinkedCommand property of the Value object.
The following code illustrates setting the value of the Customer Name element on the Customers (AR303000) form.
//custSchema is an AR303000Content object
var commands = new Command[]
{
    ...
    new Value 
    {
        Value = "John Good", 
        LinkedCommand = custSchema.CustomerSummary.CustomerName 
    },
    ...
}