In this process, you will learn how to configure field visibility and interactivity within Zuora's Code Studio. This guide will cover setting up fields as hidden, disabled, or read-only, based on different code types like new subscription, amendment, renewal, and cancellation codes. We will specifically look at configuring these settings for a quantity field within the Code Red Plan Charge object.
Configure the Object Field in Zuora's Code Studio. You can manage the visibility and interactivity of fields based on the code type, such as a new subscription code, amendment, renewal, or cancellation code. For each code type, fields can be adjusted to different visibility states.

You can set fields to be hidden, disabled, or read-only. Now, we will configure this for a quantity object in Code Studio. Start by selecting the object and field option.

Click the magnifying glass icon to display a list of objects. Select the Code Red Plan Charge object to view the relevant list of fields.

Once the list appears, select the field for which you want to define visibility. Choose the quantity field for this setup.

After selecting the field, click on select. This will confirm the Code Red Plan Charge object with the quantity field selected. Now, proceed to set the field's properties.

Click the dropdown for a new code and set it to read-only. This will make the quantity field read-only on the new code creation page. You can configure other properties similarly.

Choose "None" to clear any previous behavior without deleting the entry. "Read Only" makes the field non-editable but viewable. "Disabled" means the field appears but cannot be updated.

"Hidden" means the field is not displayed on the code page for that code type. For a new code, we will set it as read-only.

For an amend code, set the field as hidden. Similarly, keep it hidden for a renewal code. For a cancellation code, set it as read-only.

For a renewal code, keep it hidden, and for a cancellation code, also keep it hidden. You have the option on the right to click the plus button to add a new row and field, and then define its properties.

To delete the setup, click the trash icon. To make a copy and change only the object and field, use the clone icon. You can also set additional conditions for field visibility.

Define when the setup should apply using the "Choose Filter Criteria" section, or apply it to users in a specific role using the "Apply to Specific Profile" toggle button. Now, define a filter criterion. Click on the magnifying glass to see a list of objects like Opportunity, Account, Code, Code Red Plan, and Code Red Plan Charge.

Note that the filter criteria do not apply to the subscription object. In the pop-up window, select the Code Red Plan Charge object and the discount field.

After selecting the discount field, proceed to the operator field to define a criterion. Choose the comparison operator that aligns with your condition.

For our example, select "Greater or Equals." In the field or value section, specify the value to compare against. Choose value, and enter the target value in the field.

For instance, use 20. This filter criterion will make the quantity field follow the specified property when met. In this case, if the discount is greater than or equal to 20, the quantity field becomes read-only on a new, amend, renewal, and cancellation code.

You can also specify specific users for whom the setup applies. Enable the toggle button to set this up. When the toggle button is on, click the text field. A pop-up window will open, allowing you to select a profile and move it to the right.

For example, select "Standard Platform User." Move the user profile to the right and click select. If you don't want to assign it to a specific profile, turn the toggle to inactive.

During the saving process, certain validations are in place to prevent the creation of duplicate records.

Proceed to save the setup. Now, let's verify the setup on a quote page. Navigate back and click on New Quote.

Add a product to the quote.

You will observe that the quantity and discount fields are now editable. Set the discount to 30. When the discount exceeds 20, the quantity field becomes read-only and non-editable.

Try setting the discount to less than 20. You will see the quantity field is editable. Test with a discount of 20.

It should still become read-only, confirming the setup.
