Skip to main content
Updates to a quote mostly target the alternatives and quote lines. You will, however, see some changes to the quote properties when dealing with quote documents and placing orders. When updating quotes, you’ll always be working on the latest version.

Update version

This example extends the expiration date by 1 week:
Remember to call SaveQuoteVersion() whenever you update a version!

NSQuoteVersion CreateAndSaveQuoteVersion(Integer quoteVersionId)

Creates a new version based on another version of the same quote. This is your only option when you want to edit a sent quote.

NSQuoteLine RecalculateQuoteLine(NSQuoteLine quoteLine, String[] changedFields)

Many numbers in a quote line depend on each other, and changing 1 will affect others. The quote connector recalculates and updates those values so that you don’t have to worry about miscalculating. All you have to do is call RecalculateQuoteLine() to signal which fields have changed. For example, if you change the quantity, the total price and VAT amount should change too. When to recalculate:
  • Quantity
  • DiscountAmount
  • DiscountPercent
  • ListPrice
When any of these fields are changed, you must recalculate. The format is TableName.FieldName.
This example doubles the existing quantity.

Void MoveQuoteLine(Integer quoteLineId, Bool direction)

Re-sorts the quote lines of an alternative by moving a specific line up or down. Direction:
  • true = move line up
  • false = move line down

Delete quote line

Delete quote alternative

Delete quote

Always check before deleting. There might be legal and/or financial reasons to keep quote info in the system.

References

Frequently used QuoteVersion fields

For a complete list of fields, see the database reference.