| | |
| | | import queryForRecords2 from '@salesforce/apex/OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords2'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | |
| | | export default class LexNewOpportunityAgency extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | agency1Id; |
| | |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | |
| | | // + encodeURIComponent(this.opportunityCategory); |
| | | // console.log(url); |
| | | // window.open(url); |
| | | if(this.closeForecastedDate){ |
| | | if(!this.closeForecastedDate.includes(' ')){ |
| | | this.closeForecastedDate += ' 00:00:00' |
| | | } |
| | | this.closeForecastedDate = this.closeForecastedDate.replace(' ','T').replaceAll('/','-') + '.000Z'; |
| | | console.log(this.closeForecastedDate); |
| | | } |
| | | if(this.bidPlannedDate){ |
| | | if(!this.bidPlannedDate.includes(' ')){ |
| | | this.bidPlannedDate += ' 00:00:00' |
| | | } |
| | | this.bidPlannedDate = this.bidPlannedDate.replace(' ','T').replaceAll('/','-') + '.000Z'; |
| | | } |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Name: '(OLYMPUS)', |
| | | Name: '(OLYMPUS)' + this.name, |
| | | Close_Forecasted_Date__c: this.closeForecastedDate, |
| | | Bid_Planned_Date__c: this.bidPlannedDate, |
| | | OCM_Change_To_Opportunity_Flg__c: '1', |