Trondesson
Contributor
Contributor

How to retrieve the value from a custom field

Hello  @all.

In my vCenter I've created a custom field "email". The value for this field is set to the e-mail address of the operator a VM belongs to.

I like to retrieve these values in a perl script. But I only found a method to set values for custom fields. For example:

$CustomFieldsManager -> SetField(entity => $_, key=> $emailKey, value => "foo@bar.com");

What do I have to do to retrieve the value for the key $emailKey? Could somebody provide a quick and dirty code-snippet, please?

Best Regards

Trondesson

Reply
0 Kudos