1

我是salesforce的新手,这是我的问题:我创建了一个类实例列表:

  for(string val : Spct.Sales_Methodologies_and_Tools__c.split(';')){
            if (!salesMethodologies.contains(val)){
                MethodologiesTypeList.add(new SalesPortal_Utils.CustomThumbnail(val, attachmentID, ''));
                MethodologiesMap.put(val, new list<SalesPortal_Content__c>());
                salesMethodologies.add(val) ;
            }
        }

如您所见,我还创建了一张地图(但现在并不重要)

现在我想传递我的类实例列表,如果我的键值是空的,我想从列表中删除我的实例

 for (SalesPortal_Utils.CustomThumbnail delfromList : MethodologiesTypeList){
        string value = delfromList.title;
        if (isEmpty(MethodologiesMap.get(value))){
            MethodologiesTypeList.remove(delfromList);
        }
    }

我收到此错误消息:

说明资源路径位置类型保存错误:方法不存在或签名不正确:[LIST].remove(SalesPortal_Utils.CustomThumbnail) Ctrl_SalesPortal_Homepage.cls /Click/src/classes line 61 Force.com 保存问题

4

1 回答 1

1

删除应该得到一个整数索引。不要忘记在删除对象后调整索引以不从列表中跳过对象。

于 2013-11-12T08:43:54.220 回答