How to apply the rule only to the specific vendor

Question

There is a rule added to some field, and it needs to be executed only for a specific Vendor. Can this be implemented?

Answer

To apply any rule only to the specific vendor, you have to check the value of the VendorID field.

To do this, add the VendorID field (or any field that you would like to use for Vendor identification) to the rule as the read-only field. For example:

mceclip0.png

For example, this rule only needs to be applied to the vendor with ID 2. In this case, the condition should look like this:

//C#
if (Context.Field("VendorId").Value == 2){
//SCRIPT
}

 

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.