Question
How to Change Business unit if a field has a specific value.
Answer
- Go to the properties of the BUId field, Select the Rule tab and create a new Script rule, make sure that you add the newly created field to this rule, and disable read-only for the BUId field. You will see a prompt that will ask you to create a rule chain since the BUId Field has a rule already, so enter the name of the chain that you like and put this new rule to the very top.
- Click Edit in the rule and use this JScript.Net code:
if (Context.Field("SomeField").Text=="Value that should trigger the BUId change") {
Context.Field("BUId").Text=BUId that you want to be used in this scenario;
}
This script will check the value of the field and if its value is the same as you need for the change to happen BUId will be changed to the one that you need.
Comments
0 comments
Please sign in to leave a comment.