Page 1 of 1

Adding lines and charges to CDF

Posted: Thu Jul 23, 2015 10:04 am
by chris.brady
I know that a set number of empty lines have been pre-created in most sections of the CDF, but there are times when we need to add more lines than already exist.

I read in another forum post that the way to create a new line to the prepaids section is
dynamic CDFLine = ((IOrder)order).CreateNew("PrepaidDetailLine");

So the "code" for that section is "PrepaidLineDetail"

Can you provide the "code" to create new lines for all other sections, please? It would also be very helpful if you include the code for adding a new charge to a line. Thanks.

DueFromBuyer
DueToBuyer
DueFromSeller
DueToSeller
OtherCosts
Escrows
TaxesAndGovernmentFees
OriginationCharges
ServicesNotShoppedFor
ServicesShoppedFor

Re: Adding lines and charges to CDF

Posted: Mon Jul 27, 2015 9:09 am
by Melissa Cook
You cannot add new lines to Page 3 sections, but you can add new charges to the existing lines. For Page 2, you can add lines and charges. Since you have the correct code below, I will give you the name of the line object that you will need to replace it with.

Lines
OriginationChargeDetailLine
ServiceNotShoppedForDetailLine
ServiceShoppedForDetailLine
TaxAndGovernmentDetailLine
PrepaidDetailLine
EscrowDetailLine
OtherCostDetailLine

Here is the code for adding a charge to a line:
dynamic charge = ((IOrder)order).CreateNew("OriginationChargeDetailCharge")
cdfLine.Add(charge);

Charges
OriginationChargeDetailCharge
ServiceNotShoppedForDetailCharge
ServiceShoppedForDetailCharge
TaxAndGovernmentDetailCharge
PrepaidDetailCharge
EscrowDetailCharge
OtherCostDetailCharge
DueFromBuyerSummaryCharge
DueToBuyerSummaryCharge
DueFromSellerSummaryCharge
DueToBuyerSummaryCharge