Can header logic modify the expiry date on quote copy?

Question

I have a Quote with the expiry date already in the past and when I create a copy of the Quote, the date changes to "today". The effective date is not copied from the original Quote and in the copy it is also set to "today". So I end up with a Quote which has both effective and expiry dates set to "today" which is not ideal.

Is it possible to have the header logic to set the dates like this: expiry = today + x days?

Answer

You can try this:

if (earliestEffectiveDate == null) earliestEffectiveDate = today if (latestExpiryDate == null) latestExpiryDate = today + 90 quoteProcessor.updateField("targetDate", earliestEffectiveDate) quoteProcessor.updateField("expiryDate", latestExpiryDate)

Found an issue in documentation? Write to us.

Â