CRM QuoteDuplicate method

As part of the QuoteDuplicate method, we are trying to increment a custom revision number on the new quote.
In the Pre, we don’t have a value.
In the Post, we get the current value and increment it (show it in a message), but it doesn’t save the value.

Any thoughts on how to update the new quote created from the QuoteDuplicate method?

Thanks
Chris

Yes the DuplicateQuote Method is a little unique. You have to forget about the temp-table and go after the Database Table.

Basically dont update ttQuoteHed… instead update QuoteHed where QuoteNum = ttQuoteHed.QuoteNum and don’t forget Company = Company :slight_smile:

EDIT:
Dont use sourceQuote duh thats the old QuoteNum

Here is a ABL Example from E9

for each ttQuoteHed no-lock, first QuoteHed where QuoteHed.QuoteNum = ttQuoteHed.QuoteNum.
	assign QuoteHed.ShortChar01 = "Revision"
		QuoteHed.ShortChar02 = "In Progress - General"
		QuoteHed.CheckBox05 = false // Legacy Quote
		QuoteHed.Date01 = ? // Date Quoted Holder
		QuoteHed.Date02 = ? // Due Date Placeholder
		QuoteHed.ParentQuoteNum = sourceQuote
		QuoteHed.CheckBox01 = false // SOP Not Provided
		QuoteHed.Number01 = 0 // SOP Years
		QuoteHed.Number02 = 0 // Quoted Counter
		QuoteHed.ShortChar08 = string(ROWID(QuoteHed)). // This is RowIdent

end.

Thanks that’s what we will do.

1 Like

That should do the trick, I also have BPMs on DuplicateQuote and CreateOrder from Quote, because after the DuplicateQuote - Epicor will call GetByID and the DataSet will Refresh, so you don’t have to anything else, should be good to go.