• Arfiyan Shaikh 7
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi All,

I want to update the label of the global picklist value using Metadata service class. But when i run the below code it creates a new value with same label and api name

MetadataService.customValue c1 = new MetadataService.CustomValue();
                    c1.color = null;
                    c1.default_x = false;
                    c1.description = null;
                    c1.isActive = true;
                    
                    c1.fullName = s  ;
                    c1.label =s +'test lable';
                    c1.valueName =s +'test Value'; 
                    mc.add(c1);

List<MetadataService.SaveResult> results = service.updateMetadata(new MetadataService.Metadata[] { globalValueSet });
           

 
How to update the field label from the apex class? I have a managed package and want to update the Label of the Package field from Apex class without using Translation Workbench