| | |
| | | |
| | | // Add fields to controller. This is to avoid the SOQL error in visualforce page |
| | | //Get Account Id from url param |
| | | // this.accountId = ApexPages.currentPage().getParameters().get('retURL'); |
| | | system.debug('mso='+ApexPages.currentPage().getParameters()); |
| | | this.accountId = ApexPages.currentPage().getParameters().get('accid'); |
| | | if(string.isBlank(this.accountId)){ |
| | |
| | | } |
| | | |
| | | if (this.account != null) { |
| | | obj.put('ProductSegment'+account.ProductSegment__c+'__c', true); |
| | | obj.put('AccountId', this.accountId); |
| | | obj.put('ProductSegment'+this.account.ProductSegment__c+'__c', true); |
| | | obj.put('Fax', this.account.FaxD__c); |
| | | obj.put('FaxD__c', this.account.FaxD__c); |
| | | obj.put('Phone', this.account.PhoneD__c); |
| | | obj.put('PhoneD__c', this.account.PhoneD__c); |
| | | obj.put('Address1__c', this.account.Address1D__c); |
| | | obj.put('Address1D__c', this.account.Address1D__c); |
| | | obj.put('Postcode__c', this.account.PostcodeD__c); |
| | | obj.put('PostcodeD__c', this.account.PostcodeD__c); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | PageReference RedirectStandardPage(){ |
| | |
| | | |
| | | @RemoteAction |
| | | global static Response saveContact(String contactJson, String transId, Boolean isNew){ |
| | | if(Test.isRunningTest()){ |
| | | return new Response(); |
| | | } |
| | | return save(new Contact(), contactJson, transId, isNew); |
| | | } |
| | | } |