0

Dependent Picklists for Objects

Hello

I've been playing with 19R2 on a pre-release Vault instance and would like to set up "Dependent Picklists for Objects" as described in the release notes.

For "Vault Admins can set picklist dependencies using the object metadata APIs", what is the curl command to make enable picklist dependency on an object?

Thanks

Johnny

 

4 comments

  • Avatar
    Mark Arnold Official comment

    Johnny, the Picklist Dependencies can managed using our MDL API:

         https://developer.veevavault.com/api/19.2/#metadata-definition-language-mdl

    The easiest way to see the format would be to alter the dependencies in the UI and then pull the full MDL using the GET endpoint:

         https://{{hostname}}/api/mdl/components/{component_type}.{record_name}

    You can then create an ALTER command for existing objects and execute that command:

         https://developer.veevavault.com/api/19.2/#execute-mdl-script

    Example:

    ALTER Object widget__c (
         MODIFY Field attribute__c(picklist_dependencies('{"false":["alpha__c","beta__c"],"true":[]}'))
    );

  • Avatar
    John Choo

    Hello Mark

    Thanks for the information, I will look into this and get back to you if I have further questions.

    Regards

    Johnny

  • Avatar
    Mark Arnold

    One note: my example was missing the controlling field that drives the dependencies:

    ALTER Object widget__c (
         MODIFY Field attribute__c(
              controlling_picklist('my_controlling_field__c'),
              picklist_dependencies('{"false":["alpha__c","beta__c"],"true":[]}')
         )
    );

  • Avatar
    John Choo

    Thanks Mark, this worked great.

    Johnny

Please sign in to leave a comment.