ochiatt
ochiatt

Reputation: 11

Clone a quote and mantain the relationship with its original quote line items

I'm trying to make a button which clones the quote and keeps the relationship with the original QuoteLineItem. Basically I don't know how to clone related lists. I get the id from the page with ApexPages.currentPage().getParameters().get('id'); Then I query the fields I need to be duplicated, but when I click the button, it generates a quote without QuoteLineItems I've already tried with qli.clone(false,true); method, but it doesn't work. I hope it's clear enough. Thanks in advance

Upvotes: 0

Views: 410

Answers (1)

ochiatt
ochiatt

Reputation: 11

I think I figured it out by myself. A quoteLineItem is the child in the relationship, so it can have one, and only one Parent. I don't think it's possible to achieve what I wanted to do. Thanks anyway :)

Upvotes: 1

Related Questions