I am using early bound entity model to retrieve the quote.
var result = xrm.QuoteSet.Where(a => a.QuoteNumber.Equals(quoteNumber)).ToList();
if (result.Count > 0)
{
var quote = result[0];
Console.WriteLine(quote.RevisionNumber);
Console.WriteLine(quote.TotalAmount);
Console.WriteLine(quote.DiscountPercentage);
}
This always returns the older revision of the quote. I tried for the latest quote revision by including the revision number in the query and works fine.
var result = xrm.QuoteSet.Where(a => a.QuoteNumber.Equals(quoteNumber) && a.RevisionNumber.Equals(7)).ToList();
Please let me know the way to get the latest revision of the quote.
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (