| | |
| | | res.opportunityNum = String.valueOf(report.OpportunityNum__c); |
| | | res.isRelateProject = report.IsRelateProject__c; |
| | | res.profileId = UserInfo.getProfileId(); |
| | | res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME); |
| | | res.SalesManagerId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME); |
| | | res.SalesHospitalId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME); |
| | | res.Environment_Url = System.Label.Environment_Url; |
| | | System.debug(LoggingLevel.INFO, '*** xu: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** xu: ' + e); |
| | |
| | | return res; |
| | | } |
| | | |
| | | // 招标项目失单 TenderOpportunityLink |
| | | // 调用该接口var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'"; |
| | | @AuraEnabled |
| | | public static string getProfileIdByName(String name){ |
| | | Profile profile = null; |
| | | try { |
| | | profile = [select Id from Profile where Name =:name]; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return profile.Id; |
| | | } |
| | | // var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'"; |
| | | // var sqlResult = sforce.connection.query(sql); |
| | | @AuraEnabled |
| | | public static List<Tender_Opportunity_Link__c> sqlResult (String id) { |
| | | try { |
| | |
| | | public String isRelateProject; |
| | | @AuraEnabled |
| | | public String profileId; |
| | | @AuraEnabled |
| | | public String systemProfileId; |
| | | @AuraEnabled |
| | | public String SalesManagerId; |
| | | @AuraEnabled |
| | | public String SalesHospitalId; |
| | | @AuraEnabled |
| | | public String Environment_Url; |
| | | } |
| | | } |