Created
March 29, 2017 23:10
-
-
Save winniecluk/12acc63da21ad57abf87d214a26ffe81 to your computer and use it in GitHub Desktop.
apex controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global with sharing class LP_Dashboard_Controller { | |
public Opportunity record {get;set;} | |
// public LP_Dashboard_Controller(ApexPages.standardController standardController){ | |
// this.record = (Opportunity)standardController.getRecord(); | |
// if ( record.Id != null ){ | |
// //util.queryRecord(record.Id); | |
// } | |
// } | |
@RemoteAction | |
global static String getOpps(){ | |
List<Opportunity> oList = [ | |
SELECT StageName, Fund__c, Loan_Number__c, Property_Address__c, Property_City__c, Property_County__c, | |
Pledged__c, Pledged_Amount__c, Total_Loan_Amount__c, Initial_Funding__c, Renovation_Loan__c, | |
Renovations_Funded__c, Date_Drawn_Down__c, Interest_Reserve__c, Total_Funding_to_Date__c, Maturity_Date1__c, | |
Holding_Period__c, Purchase_Price__c, Actual_Renovation_Cost__c, Entity_on_title__c, Borrower_Svcing_Number__c, | |
Borrower_Exposure__c, Holdback_Amount__c, Payoff_Date__c, of_Assets__c, Interest__c, | |
Sold_Price__c FROM Opportunity | |
]; | |
return JSON.serialize(oList); | |
} | |
public PageReference save(){ | |
upsert record; | |
if ( !ApexPages.hasMessages() ){ | |
return new ApexPages.standardController(record).view().setRedirect(true); | |
} | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment