Code
Walk-through
In the above example, we have created a selection using entities and then we have used the providers to add the restriction for the members that should be added to the created selection. The creation of the selection is pretty straight forward so we will just explain how to add search criteria. We have created an array ofArchiveRestriontionInfo objects since we will add more than one restriction. When you are specifying the restriction, you have to specify the criteria using 3 parameters:
- the name of the field
- the operator
- the value
business table.
Once we have the restrictions ready, we need to store them against the selection to tell the system that this restriction is for a particular selection. We can do this with a RestrictionCriteriaStorage provider. We can save our restrictions using the SaveRestriction method. In the SaveRestriction method, the second parameter will act as the key. If you want you can access this criterion using this key.
Now that we have completed the job, you can open SuperOffice and view this selection. See screenshot of the dialog.