Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.theProductToInsert.IsActive = true;
- insert this.theProductToInsert;
- PriceBookEntry thePriceBookEntry = new PriceBookEntry(
- IsActive = true,
- Pricebook2Id = this.thePriceBook.Id,
- Product2Id = this.theProductToInsert.Id,
- UnitPrice = 1
- );
- insert thePriceBookEntry;
- System.debug('*** thePriceBookEntry: ' + thePriceBookEntry);
- insert new OpportunityLineItem(
- OpportunityId = this.theOpportunity.Id,
- PricebookEntryId = thePriceBookEntry.Id,
- Quantity = this.theOpportunityLineItem.Quantity,
- UnitPrice = this.theOpportunityLineItem.UnitPrice,
- Status__c = this.theOpportunityLineItem.Status__c,
- Lead_time__c = this.theOpportunityLineItem.Lead_time__c
- );
- thePricebookEntry.CurrencyIsoCode = this.theOpportunity.CurrencyIsoCode;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement