0

I need to update the value in custom metadata type when ever the class called/invoked. I am getting error like field is not writable even though permission is there,here family id is number data types

global class Docketnumbertag
{
    @InvocableMethod
    public static List<string> updatefamilid()
    {
        List<SymphonyIPM__Docket_Number_Tags__mdt> Docketnumbertag = [SELECT
            Id, 
            SymphonyIPM__Family_ID__c
        FROM
            SymphonyIPM__Docket_Number_Tags__mdt];
        for(SymphonyIPM__Docket_Number_Tags__mdt addfamilyid: Docketnumbertag)
        {
            addfamilyid.SymphonyIPM__Family_ID__c = addfamilyid.SymphonyIPM__Family_ID__c + 1;
        }
    }
}

1 Answer 1

0

Custom metadata is not updateable using DML, You can only do that by using the Metadata API however you can retrive it using SOQL query.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .