General X++ Development

How do I pass parameters to a SysOperation batch job?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

How do I pass parameters to a SysOperation batch job?

SSunny Vasty75 reputation · answered Aug 13, 2026

Put the parameters on a data contract.

X++
[DataContract]
class MyOperationContract
{
    str value;

    [DataMemberAttribute('Value')]
    public str parmValue(str _value = value)
    {
        value = _value;

        return value;
    }
}

When the operation runs in batch, the framework serializes the contract values and restores them when the batch task executes.