I've exposed a custom global class (EmailEventUtils.Result) as the return value for a global static REST endpoint. I've published the class as part of a managed package.

global class RESTEmailController {
    global static EmailEventUtils.Result doPost() {

global class Result {
    public List<sObject> newRecords = new List<sObject>();
    public List<Id> newRecordIds = new List<Id>();
    public Map<String, String> extraFieldValues;
    public String objectType;
    public boolean isSuccess;
    public String action;
    public String resultCode;
    public String resultMessage;  
    public String data;

I've since changed the class by adding a public instance variable to it and now cannot update the package anymore. and am getting the error code:

Invalid type for Http* method: GrooveResult.ExtraTaskFieldsSet.LIST.ExtraTaskField.LIST.Schema.PicklistEntry

Is it not possible to change a referenced global class after it has been published? What do people usually do if they do need to change it later?

I'm thinking I could potentially create the class again with a different name and all the same instance variables + the new ones I'm adding - but that seems super dirty....

  • try adding primitive data type variable and see if it works ?I belive in HTTP class you cant make property variable of type Schema.PicklistEntry. – Mohith Shrivastava Oct 18 '14 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.