Skip to main content
Veeva Support EU Holiday: Mar 15th - Limited staff, please plan accordingly

Community

Search

Welcome to Community

Object Field dependencies through API

Answered

Comments

2 comments

  • Official comment
    Eric Matelyan

    When working with Vault components using MDL, you will need to refer to the components using the component record name (xyz__c), and not the label (XYZ). For Example, to ALTER the XYZ object, you will need to use
    ALTER Object xyz__c

    For figuring out the correct format of MDL scripts, it can be helpful to create an example in the Vault UI, and then retrieve the MDL script using the API. In your use case, you can create or use an object, add 2 picklists to it, then create the picklist dependencies in the UI. Then retrieve the MDL script for this configuration using the "Retrieve Component Record (MDL)" endpoint.
    https://developer.veevavault.com/api/22.3/#retrieve-component-record-mdl


    Below is a piece of sample code for creating dependencies between picklists using MDL.

    ALTER Object test_object__c (
    MODIFY Field picklist_b__c(
    controlling_picklist('picklist_a__c'),
    picklist_dependencies('{"value_a1__c":["value_b1__c","value_b2__c"],"value_a2__c":["value_b1__c","value_b3__c"],"value_a3__c":[]}')
    )
    );
  • Puppala, Arundhathi

    Thank you. It worked.

    0

Please sign in to leave a comment.

Powered by Zendesk