Closed antonyxuan closed 6 years ago
@antonyxuan The sample code is correct as currently in the repo.
The OpportunityLineItem, ApplyDiscount method (line 35; see below) expects 3 parameters -- IOpportunities, Decimal, fflib_ISObjectUnitOfWork. In the sample usage, this
is the instance of the wrapping class which contains the Opportunity records to be processed, discountPercentage
a Decimal variable containing the fractional amount by which the unit price will be adjusted, and uow
the FFLIB unit of work instance (which was supplied to the wrapping method) that will store the Opportunity records that will be updated.
Regards.
Thanks @stohn777 , you are right my mistake
https://github.com/financialforcedev/fflib-apex-common-samplecode/blob/a400ac2348dc3c33ab9a4e68617f7ff2b59153d1/fflib-sample-code/src/classes/Opportunities.cls#L142
should this be 'this.discountPercentage' instead of 'this, discountPercentage'?