ffrr.CalculationServiceglobal with sharing class CalculationService EnumsLineTypeIndicates the type of revenue recognition display record.
Methods
calculateDeliverableglobal static ffrr.CalculationService.Calculation calculateDeliverable(Decimal totalRevenue, Decimal prevRecognized) Calculates revenue for a Deliverable template type using the supplied total revenue and previously recognized values. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Call the method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculateDeliverable(2000.00, 250.00); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); calculateEqualSplitglobal static ffrr.CalculationService.Calculation calculateEqualSplit(Decimal totalRevenue, Decimal prevRecognized, Date startDate, Date endDate, Date recognitionDate) Calculates revenue for an Equal Split template type and a calculation type of Months using the supplied values. The results are calculated on whole months. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Setup the dates involved Date startDate = Date.newInstance(2013, 01, 01); Date endDate = Date.newInstance(2013, 12, 31); Date recognitionDate = Date.newInstance(2013, 01, 05); //Call the method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculateEqualSplit(1200.00, 50.00, startDate, endDate, recognitionDate); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); calculateEqualSplit445global static ffrr.CalculationService.Calculation calculateEqualSplit445(Decimal totalRevenue, Decimal prevRecognized, Date startDate, Date endDate, Date recognitionDate) Calculates revenue for an Equal Split template type and a 445 calculation type using the supplied values. The results are calculated using the 445 recognition periods and years defined in the system. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //This sample requires that Revenue Recognition years and periods exist within //the system as, without them, calculations that rely on periods cannot be performed. //Setup the dates involved Date startDate = Date.newInstance(2013, 01, 01); Date endDate = Date.newInstance(2013, 12, 31); Date recognitionDate = Date.newInstance(2013, 01, 05); //Actually call the calculateEqualSplit445 method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculateEqualSplit445(1200.00, 50.00, startDate, endDate, recognitionDate); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); calculateEqualSplitDaysglobal static ffrr.CalculationService.Calculation calculateEqualSplitDays(Decimal totalRevenue, Decimal prevRecognized, Date startDate, Date endDate, Date recognitionDate) Calculates revenue for an Equal Split template type and a calculation type of Days using the supplied values. The results are calculated according to the number of days between the specified start and recognition dates and the mean value per day between the specified start and end dates. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //This sample requires that Revenue Recognition years and periods exist within //the system as, without them, calculations that rely on periods cannot be performed. //Setup the dates involved Date startDate = Date.newInstance(2013, 01, 01); Date endDate = Date.newInstance(2013, 12, 31); Date recognitionDate = Date.newInstance(2013, 01, 05); //Call the method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculateEqualSplitDays(1200.00, 50.00, startDate, endDate, recognitionDate); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); calculateEqualSplitMonthsPartPeriodsglobal static ffrr.CalculationService.Calculation calculateEqualSplitMonthsPartPeriods(Decimal totalRevenue, Decimal prevRecognized, Date startDate, Date endDate, Date recognitionDate) Calculates revenue for an Equal Split template type and a calculation type of Months/Part Periods using the supplied values. The results are calculated using both whole and part months/periods. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //This sample requires that Revenue Recognition years and periods exist within //the system as, without them, calculations that rely on periods cannot be performed. //Setup the dates involved Date startDate = Date.newInstance(2013, 01, 01); Date endDate = Date.newInstance(2013, 12, 31); Date recognitionDate = Date.newInstance(2013, 01, 05); //Actually call the calculateEqualSplitMonthsPartPeriods method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculateEqualSplitMonthsPartPeriods(1200.00, 50.00, startDate, endDate, recognitionDate); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); calculatePercentageCompleteglobal static ffrr.CalculationService.Calculation calculatePercentageComplete(Decimal totalRevenue, Decimal prevRecognized, Decimal percentageComplete) Calculates revenue for a % Complete template type using the supplied values. The results are calculated as a percentage of the total revenue. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Call the method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculatePercentageComplete(1200.00, 50.00, 50.00); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); calculateRevenueglobal static ffrr.CalculationService.Calculation calculateRevenue(SObject record, Date recognitionDate, String currencyFilter) Calculates revenue based on the template associated with the supplied record. The method will automatically extract the required values based on the record's template, determine the calculation type involved, validate any needed data and perform the calculation. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Calculation object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Note: This sample requires that a complete set of Settings, Templates, and Recognition //Years and Periods (covering the year 2013) are available within the system. For the //purposes of this example it is assumed that we are using an ffrr__PerformanceObligation__c record which is //correctly connected to a valid Template. You can put any source record here. //The item that we'll be calculating revenue for. You would use your SObject here. SObject mySourceObject = [ SELECT Id, Name, ffrr__ffrrTemplate__c, ffrr__StartDate__c, ffrr__EndDate__c, ffrr__Revenue__c FROM ffrr__PerformanceObligation__c LIMIT 1 ]; //Note: The mySourceObject needs to be populated at this point. *How* it is populated, //naturally, depends on the object type etc. but the extracted record must include the //ffrrTemplate__c field and any required fields based on that template. //For example, if the template is of type '% Complete', then the 'Complete' field must be included //Setup the recognition date that we'll be using Date recognitionDate = Date.newInstance(2013, 01, 05); //Call the method ffrr.CalculationService.Calculation revenueRecord = ffrr.CalculationService.calculateRevenue(mySourceObject, recognitionDate, 'USD'); //Output the results that came back System.debug('RecognizedToDate: ' + revenueRecord.recognizedToDate); System.debug('PreviouslyRecognized: ' + revenueRecord.previouslyRecognized); System.debug('ToRecognizeThisPeriod: ' + revenueRecord.toRecognizeThisPeriod); System.debug('TotalRevenue: ' + revenueRecord.totalRevenue); System.debug('CalculatedTotalRevenue: ' + revenueRecord.calculatedTotalRevenue); System.debug('Errors: ' + revenueRecord.errors); deleteAllLines
global static Id deleteAllLines() Deletes all staging table data created by the current user regardless of recognition date or group. Due to the potential volume of data involved, the actual deletion is handled via a batch job and therefore the time involved will depend on factors such as data volume, server load and network traffic. Return ValueThis service returns an ID object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Call the method ID deleteBatchID = ffrr.CalculationService.deleteAllLines(); deleteLines
global static Id deleteLines(Schema.SObjectType groupName, Boolean loadLines, Date recognitionDate) Deletes data for a specific group from the staging tables, optionally repopulating the tables afterwards for the specific group using the supplied recognition date. Due to the potential volume of data involved, the actual deletion (and optional repopulation) is handled via a batch job and therefore the time involved will depend on factors such as data volume, server load and network traffic. Input Parameters
Return ValueThis service returns an ID object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Setup the recognition date that we'll be using Date recognitionDate = Date.newInstance(2013, 01, 05); //Note: This sample code shows how to clear the Recognition Staging Tables of data //for the Opportunity group and then repopulate the table. To clear and *not* //repopulate the tables, pass false as the second parameter. ID deleteBatchID = ffrr.CalculationService.deleteLines(Opportunity.SObjectType, true, recognitionDate); loadLines
global static Id loadLines(Schema.SObjectType groupName, Date recognitionDate) Updates the staging table data for the specified group and current user at the recognition date. The loadLines method does not remove any existing data from the staging tables, instead overwriting and adding as necessary. Due to the potential volume of data involved, the actual loading is handled via a batch job and therefore the time involved will depend on factors such as data volume, server load and network traffic. Input Parameters
Return ValueThis service returns an ID object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Setup the recognition date that we'll be using Date recognitionDate = Date.newInstance(2013, 01, 05); //Call the method to populate/update the Revenue Recognition Staging tables ID loadBatchID = ffrr.CalculationService.loadLines(Opportunity.SObjectType, recognitionDate); retrieveLines
global static List<ffrr.CalculationService.LineDetail> retrieveLines(Id parentID, Integer parentLevel, ffrr.ViewService.Tab filters) Gets the detail lines when drilling into a summary item on the Recognize Revenue page for the specified parent item and applying the supplied filters. The returned data will include both detail and summary items (which may then be used to drill deeper into the available data). Input Parameters
Return ValueThis service returns a list of ffrr.CalculationService.LineDetail objects. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Note: This sample demonstrates how to call the retrieveLines method and therefore //relies on there being data within the system (if no data is available, no data //will be retrieved). If you wish to add Settings, Templates, Recognition Years //and Periods, and the corresponding data items then the results that are returned //will alter and, depending on the data, demonstrate drilling down into data //Setup the recognition date that we'll be using Date recognitionDate = Date.newInstance(2013, 01, 05); //Setup the items that we'll be filtering by. For the purposes of this sample we //won't add any filters ffrr.ViewService.Tab filters = new ffrr.ViewService.Tab(); ffrr.ViewService.TabFilter tabFilter = new ffrr.ViewService.TabFilter(); if (UserInfo.isMultiCurrencyOrganization()) //If this is a multi-currency org... { tabFilter.currencyName = UserInfo.getDefaultCurrency(); //...set the currency filter } tabFilter.recognitionDate = recognitionDate; filters.tabFilter = tabFilter; //Note: The objectType is the object type of the group/tab being queried - adjust as necessary filters.objectType = Opportunity.getSObjectType(); //Extract the top level items (e.g. projects) List<ffrr.CalculationService.LineDetail> displayLines = ffrr.CalculationService.retrieveLines(null, null, filters); ID drillDownID = null; //Output how many items we retrieved system.debug('Returned Lines: ' + displayLines.Size()); //Output each of the lines that we retrieved for (ffrr.CalculationService.LineDetail displayLine : displayLines) { system.debug('displayLine (Root): ' + displayLine); //To demonstrate drilling down into data, see if this is a Summary line (i.e. something that //that we *can* drill into) and record the line's ID if (displayLine.lineType == ffrr.CalculationService.LineType.SUMMARY) { drillDownID = displayLine.ID; } } //Note: The following section of code demonstrates how to drill into a summary item. It will only //execute if we identified something to drill into though in the above loop if (drillDownID != null) //Do we have a line to drill into? { //Yes - Try to drill down into it displayLines = ffrr.CalculationService.retrieveLines(drillDownID, 1, filters); //Output each of the child lines that we retrieved for (ffrr.CalculationService.LineDetail displayLine : displayLines) { system.debug('displayLine (Child): ' + displayLine); } } retrieveRecordDetailsglobal static ffrr.CalculationService.Record retrieveRecordDetails(Id recordId) Retrieves the detail of the specified record. The returned data will include the values used in calculations and high level details of the record. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Record object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Note: This sample demonstrates how to call the retrieveRecordDetails method and //therefore relies on there being data within the system (if no data is available, //no data will be retrieved). Given the nature of this sample, setting the ID of the //record to be retrieved isn't possible. If you wish to fully test the sample code //you will need to configure your Settings, Templates etc. and populate recordID //with the ID of one of your data records ID recordID = null; //Call the method ffrr.CalculationService.Record recordDetails = ffrr.CalculationService.retrieveRecordDetails(recordID); //Output the data that was returned system.debug('RecordDetails: ' + recordDetails); retrieveRecordDetailsglobal static ffrr.CalculationService.Record retrieveRecordDetails(Id recordId, ffrr.ViewService.ViewType viewType) Retrieves the detail of the specified record. The returned data will include the values used in calculations and high level details of the record. Input Parameters
Return ValueThis service returns a ffrr.CalculationService.Record object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Note: This sample demonstrates how to call the retrieveRecordDetails method and //therefore relies on there being data within the system (if no data is available, //no data will be retrieved). Given the nature of this sample, setting the ID of the //record to be retrieved isn't possible. If you wish to fully test the sample code //you will need to configure your Settings, Templates etc. and populate recordID //with the ID of one of your data records. The View Type determines the type ( e.g. Actual, Forecast) of the records //to be retrieved. ID recordID = null; //Call the method (retrieve details for a record of type Forecast) ffrr.CalculationService.Record recordDetails = ffrr.CalculationService.retrieveRecordDetails(recordID, ffrr.ViewService.ViewType.FORECAST); //Output the data that was returned system.debug('RecordDetails: ' + recordDetails); ffrr.CalculationService.Calculationglobal virtual class Calculation extends ViewService.Reference Contains the results of a revenue recognition calculation. This class extends ffrr.ViewService.Reference Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Create the Calculation ffrr.CalculationService.Calculation calc = new ffrr.CalculationService.Calculation(); //Populate the fields inherited from ffrr.ViewService.Reference calc.id = 'a0va00000059tb8'; calc.name = 'My Calculation'; //Populate the fields from specific to ffrr.CalculationService.Calculation calc.previouslyRecognized = 112.78; calc.recognizedToDate = 1222.95; calc.toRecognizeThisPeriod = 75.25; calc.totalRevenue = 2000.00; calc.calculatedTotalRevenue = 1500.00; //Create a list to hold any errors for the calculation calc.errors = new List<String>(); //Add the errors to the error list calc.errors.add('Missing year/period'); calc.errors.add('Total recognized cannot be greater than total revenue'); Properties
MethodsCalculationglobal Calculation() ffrr.CalculationService.CalculationPartglobal virtual class CalculationPart Contains the results of a revenue recognition calculation for Cost or Revenue. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Create the Calculation ffrr.CalculationService.Calculation calc = new ffrr.CalculationService.Calculation(); //Populate the fields inherited from ffrr.ViewService.Reference calc.id = 'a0va00000059tb8'; calc.name = 'My Calculation'; //Populate the fields from specific to ffrr.CalculationService.Calculation calc.previouslyRecognized = 112.78; calc.recognizedToDate = 1222.95; calc.toRecognizeThisPeriod = 75.25; calc.totalRevenue = 2000.00; calc.calculatedTotalRevenue = 1500.00; //Create a list to hold any errors for the calculation calc.errors = new List<String>(); //Add the errors to the error list calc.errors.add('Missing year/period'); calc.errors.add('Total recognized cannot be greater than total revenue'); Properties
ffrr.CalculationService.CalculationResultglobal class CalculationResult extends ViewService.Reference This class extends ffrr.ViewService.Reference Properties
MethodsCalculationResultglobal CalculationResult() ffrr.CalculationService.LineDetailglobal class LineDetail extends Calculation
Contains a complete set of line or summary data as used by the revenue recognition user interface. The structure contains everything needed to recognize the row data. This class extends ffrr.CalculationService.Calculation Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Create the account, template and parent/item reference data that we'll need //Create the reference to the account ffrr.ViewService.Reference sampleAccount = new ffrr.ViewService.Reference(); sampleAccount.id = 'a1ga00000111sg6'; sampleAccount.name = 'My Account'; //Create the template ffrr.CalculationService.Template sampleTemplate = new ffrr.CalculationService.Template(); sampleTemplate.id = 'a0ba00000512cc6'; sampleTemplate.name = 'TimeCard Template'; sampleTemplate.calculationType = 'Months / Part Periods'; sampleTemplate.revenueBasis = 'Total Revenue'; sampleTemplate.templateType = 'Equal Split'; //Create the parent/item references ffrr.ViewService.Reference projectReference = new ffrr.ViewService.Reference(); projectReference.id = 'a0sa00000011op1'; projectReference.name = 'My Project'; ffrr.ViewService.Reference milestoneReference = new ffrr.ViewService.Reference(); milestoneReference.id = 'a0ga00000026abx'; milestoneReference.name = 'My Milestone'; ffrr.ViewService.Reference timecardReference = new ffrr.ViewService.Reference(); timecardReference.id = 'a0va00000059tb8'; timecardReference.name = 'My TimeCard'; //Create the LineDetail ffrr.CalculationService.LineDetail ldSample = new ffrr.CalculationService.LineDetail(); //Populate the fields inherited from ffrr.ViewService.Reference ldSample.id = 'a0va00000059tb8'; ldSample.name = 'My TimeCard'; //Populate the fields inherited from ffrr.CalculationService.Calculation ldSample.errors = new List<String>(); ldSample.recognizedToDate = 1222.95; ldSample.toRecognizeThisPeriod = 75.25; ldSample.totalRevenue = 2000.00; //Populate the fields specific to ffrr.CalculationService.LineDetail ldSample.account = sampleAccount; ldSample.stagingRecordID = 'a1za00001024zt2'; ldSample.template = sampleTemplate; //Specify what type of line this is (detail or summary) ldSample.lineType = ffrr.CalculationService.LineType.DETAIL; //Create a list to hold the references to the object and all of its parents ldSample.parentPath = new List<ffrr.ViewService.Reference>(); //Add the reference to the object and all of its parents ldSample.parentPath.add(projectReference); ldSample.parentPath.add(milestoneReference); ldSample.parentPath.add(timecardReference); Properties
ffrr.CalculationService.Recordglobal class Record extends ViewService.Reference Contains the required details of a source record, based on the settings record and template associated it. This class extends ffrr.ViewService.Reference Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Create the filters that apply to this item //Create a filter for the billing country ffrr.ViewService.TabSelectorFilter tsfBillingCountry = new ffrr.ViewService.TabSelectorFilter(); tsfBillingCountry.field = Account.BillingCountry; tsfBillingCountry.values = new List<String>{'UK', 'US'}; //Create a filter for the industry ffrr.ViewService.TabSelectorFilter tsfIndustry = new ffrr.ViewService.TabSelectorFilter(); tsfIndustry.field = Account.Industry; tsfIndustry.values = new List<String>{'Insurance', 'Finance'}; //Create the Record ffrr.CalculationService.Record rSample = new ffrr.CalculationService.Record(); //Populate the fields inherited from ffrr.ViewService.Reference rSample.id = 'a0va00000059tb8'; rSample.name = 'My Account'; //Populate the fields specific to ffrr.CalculationService.Record rSample.delivered = 'True'; rSample.description = 'Time card details for the start of the first quarter'; //Specify the start and end dates of the item rSample.startDate = date.newInstance(2013, 1, 1); rSample.endDate = date.newInstance(2013, 3, 31); //Specify the values that we want to return for this item rSample.percentageComplete = 25; rSample.rate = 12.50; rSample.totalUnits = 500; rSample.vsoePercent = 80; rSample.vsoeRate = 12.50; //Create a list to hold any filters for this item rSample.filters = new List<ffrr.ViewService.TabSelectorFilter>(); //Add the filters for this item rSample.filters.add(tsfBillingCountry); rSample.filters.add(tsfIndustry); Properties
ffrr.CalculationService.Templateglobal class Template extends ViewService.Reference Contains the details of the calculation to be applied to the source data. This class extends ffrr.ViewService.Reference Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Create the Template ffrr.CalculationService.Template tmpSample = new ffrr.CalculationService.Template(); //Populate the fields inherited from ffrr.ViewService.Reference tmpSample.id = 'a0ba00000512cc6'; tmpSample.name = 'TimeCard Template'; //Populate the fields specific to ffrr.CalculationService.Template tmpSample.calculationType = 'Days'; tmpSample.revenueBasis = 'Total Revenue'; tmpSample.templateType = 'Equal Split'; Properties
MethodsTemplateglobal Template() Contains the information of a template. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Create the template ffrr.CalculationService.Template tSample = new ffrr.CalculationService.Template(); //Populate the fields inherited from ffrr.ViewService.Reference tSample.id = 'a0va00000059tb8'; tSample.name = 'My Template'; //Populate the fields specific for the ffrr.CalculationService.Template tSample.templateType = 'Equal split'; tSample.revenueBasis = 'Total Revenue'; tSample.calculationType = 'Months'; |