| | |
| | | public string Comments {get;set;} |
| | | public string ApprovalAction {get;set;} |
| | | public PageReference redirectPage; |
| | | //public String testlink {get; set;} |
| | | //初始化 |
| | | public ProcessInstanceSolController() |
| | | { |
| | | // testlink = ApexPages.currentPage().getParameters().get('testlink'); //当前节点名字 |
| | | processId = ApexPages.currentPage().getParameters().get('id'); //获取当前的工作流ID |
| | | SolId = ApexPages.currentPage().getParameters().get('SolId'); //获取当前case ID |
| | | system.debug(processId+'==ceshi==='+SolId); |
| | | objSol = [select Name,Confirmation_Result__c,Remarks__c,ProcessOfApproval__c from Solution_Programme__c where id =:SolId]; //获取当前Opp对象为了后面更新comments和Reson |
| | | redirectPage = new PageReference('/'+SolId); |
| | | } |
| | |
| | | { |
| | | //system.debug('ApprovalAction:'+this.ApprovalAction); |
| | | // User nextapprover =[select Id from User where username = 'yinghai_guo_neo@sina.com'];//新建立一个object 并mapping关系 |
| | | if(ApprovalAction == 'Reject'){ |
| | | /**if(ApprovalAction == 'Reject'){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请填写反馈结果,并按审批按钮')); |
| | | return null; |
| | | } |
| | | }**/ |
| | | if(objSol.Confirmation_Result__c == null){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '批准之前必须填写反馈结果!')); |
| | | return null; |