0
嗨,我正在以下錯誤在此代碼 /* 類:CreateMobileChatterCntrl 說明:郵政顫振的聯繫。 製作人:哈里什卡特里(Appirio公司離岸) 創建日期:2012年6月2日 */人品沒有可行的替代方案「」
public without sharing class CreateMobileChatterCntrl {
public final Id ContactID{get;set;}
public String message{get;set;}
public boolean isSuccess{get;set;}
public boolean throwError{get;set;}
public String deviceType{get;set;}
//----------------------------------------------------------------------------
//constructor
//----------------------------------------------------------------------------
public CreateMobileChatterCntrl() {
throwError = false;
isSuccess = false;
if(ApexPages.CurrentPage().getParameters().get('id') != null){
ContactID = ApexPages.CurrentPage().getParameters().get('id');
}
String userAgent = ApexPages.currentPage().getHeaders().get('USER-AGENT');
if(userAgent.contains('iPhone'))
deviceType = 'iPhone';
//else if(userAgent.contains('Android')) deviceType = 'Android';
}
//----------------------------------------------------------------------------
// Post the chatter on contact
//----------------------------------------------------------------------------
public Pagereference save() {
if(message == null || message ==''){
throwError = true;
return null;
}
FeedItem feedItem = new FeedItem();
feedItem.ParentId = ContactID;
feedItem.Body = message;
try {
insert feedItem;
isSuccess = true;
} catch(Exception e){}
return null;//new PageReference('/' + ContactID);
}
public Pagereference cancel() {
return new PageReference('/' + ContactID);
}
}
公衆最終標識的ContactID {獲取;集;}在這行我得到的錯誤沒有可行的替代方案,在字符''。可以任何人請幫助爲什麼我得到這個錯誤?
如果錯誤的單引號在視覺上相同,但使用了不同的代碼點,查找和替換將不起作用。 – jpaugh