Prerequisites: A valid Entity
Namespaces: InRule.Runtime
Classes: Field, Collection, Entity
See Also: Retrieving a Rule Application, Creating a RuleSession, Creating Entities, Retrieving Fields
Setting a field in the entity
// Set the CustID field to 2
invoiceEntity.Fields["CustomerID"].Value = 2;
Setting a field from a collection
// Set the ProductID field of the first LineItem in the LineItems collection.
invoiceEntity.Collections["LineItems"][0].Fields["ProductID"].Value = 6;
Note: Collection indexing is 0-based through the SDK and 1-based for referencing within rules.
Comments
0 comments
Please sign in to leave a comment.