The following Apex method can be used to create a fixed fee matter fee arrangement for a matter via custom coding. Please be aware that it is always suggested to test your code in the Sandbox.
FeeArrangementService.createFixedFeeMatterFeeArrangement( @feeArrangementRecordId, @matterRecordId, @matterPrice, @defaultForFees, @defaultForExpenses, @recurrence, @startDate, @endDate );
The fee arrangement record's id value using which the fixed matter fee arrangement is to be created.
The matter record's id value for which the fixed matter fee arrangement is to be created.
Your finalized matter price offered to client.
To mark this matter fee arrangement as default when entering time for this matter.
To mark this matter fee arrangement as default when entering expenses for this matter.
Provide how often the client is to be charged for this fees.
(Accepted values are:
If your recurrence is other than One Time then provide the start date for it.
If your recurrence is other than One Time then provide the end date for it.
The function will return list of sObjects of matter fee arrangement type.
- advpm__ Source_Fee_Arrangement__c
- advpm__ Matter__c
- advpm__ Matter_Price__c
- advpm__ Discount_Percentage__c
- advpm__ Contingency_Percentage__c
- advpm__ Fee_Arrangement_Price__c
- advpm__ Total_Unit_Caps__c
- advpm__ Recurrence__c
- advpm__ Default_for_Fees__c
- advpm__ Default_for_Expenses__c
- advpm__ Start_Date__c
- advpm__ End_Date__c
- advpm__ Transactions_Billed_To_Date__c
- advpm__ Transactions_To_Be_Billed__c
- advpm__ Total_Price__c
- advpm__ Total_Cost_as_Priced__c
- advpm__ As_Priced_Profit_Margin__c
- advpm__ Total_Cost_for_Expenses__c
- advpm__ Total_Cost_for_Time__c
- advpm__ Total_Cost_as_Delivered__c
- advpm__ As_Delivered_Profit_Margin__c
- advpm__ NextBillDate__c
- advpm__ LastBillDate__c
advpm__Matter_Fee_Arrangement__c result = FeeArrangementService.createFixedFeeMatterFeeArrangement( 'a0A9000000RJhKTE', 'a05900000051CpN', 2000, true, false, 'Monthly', Date.valueOf('2023-01-01'), Date.valueOf('2023-10-31') ); System.debug('Matter Fee Arrangement created : ' + result.Name);