いつもお世話になっております。
株式会社サンレディースの石井です。
現在下記のApexコードをフローから実行したいと考えておりますが、
なぜかフロー内でApexアクションを追加しても下記のクラスが出てこず
追加できません。
なにか特別なクラスが必要になってくるのでしょうか。
何分知識不足で申し訳ありません。
何卒宜しくお願い致します。
global class ElectronicSignatureController {
@RemoteAction
global static ReturnValue saveSignature(String signValue) {
ReturnValue returnValue = new ReturnValue();
try{
ElectronicSignature__c eSignature = new ElectronicSignature__c();
// テキストエリア (リッチ)
eSignature.SignDateTime__c = System.now();
eSignature.SignValue__c = '<img src="' + signValue + '"/>';
//get.idでそのレコードのIDが取得できるかもしれない
//自分が作りたい見込み客名のIDを割り当てる
//eSignature.HIBIS_Moushikomi__c = pro;
insert eSignature;
//契約情報を参照関係で持たせて反映させる
// 添付ファイル
Attachment signAttachment = new Attachment();
signAttachment.ParentID = eSignature.Id;
signAttachment.Body = EncodingUtil.base64Decode(signValue.replace('data:image/png;base64,', ''));
signAttachment.contentType = 'image/png';
signAttachment.Name = '電子サイン';
signAttachment.OwnerId = UserInfo.getUserId();
insert signAttachment;
// 正常終了
returnValue.isSuccess = true;
returnValue.message = '処理が正常に行いました。電子サインレコード詳細画面に遷移します。';
returnValue.recordId = eSignature.Id;
} catch(Exception e){
// 異常終了
returnValue.isSuccess = false;
returnValue.message = 'システムエラーが発生しました。' + e.getMessage();
}
return returnValue;
}
global class ReturnValue {
global Boolean isSuccess { get; set; }
global String message { get; set; }
global String recordId {get; set;}
}
}