I was wondering if it was possible to find the provisioning group by usining the vCAC VM entity? When I check the properties it only gives me the custom ones and it doesnt show the provisioning group
If you mean a vCACVirtualMachine than I thought it was this way, but it returns me null in my environment (vRA 6.2):
var vmEntity = vCACVm.getEntity();
var ownerEntity = vmEntity.getLink( vCACHost,"Owner" ).shift();
var provisioningGroupEntity = ownerEntity.getLink( vCACHost,"ProvisioningGroup" ).shift();
You can try if this is working.
Something like this should work:
var blueprints = vcacVM.getEntity().getLink(vcacHost, "VirtualMachineTemplate");
System.debug("blueprint: " + blueprints);
var businessGroups = blueprints.getLink(vcacHost, "ProvisioningGroup");
System.debug("businessGroup: " + businessGroups.getInventoryObject());
yup this works thanks!