Having a bit of trouble understanding what I’m doing wrong with my quote adapter. I’m creating a quote detail record from a quote adapter.
I call the methods in the order I find them in the trace log.
I catch the exception message of “Part is Required” when this code is run and it occurs right before the last adapter update. Seems that I am providing the correct information for it to create a Quote Dtl record, but can anyone see what I’m missing?
I’ve also attempted setting the field values before and after the ChangePartNum method fires, but any time I call the update, I get the Part Num Is Required message.
I definitely think I’m missing something on this one, any help would be appreciated.
adapterQuote.QuoteData.QuoteDtl[0].PartNum = partNum; // set this before calling:
adapterQuote.QuoteData.QuoteDtl[0].PartDescription = partNum; // leave for testing
adapterQuote.ChangePartNum(false, String.Empty);
I think it can be pretty confusing what needs to be set before a certain method will perform correctly. In the code example above it looks like he’s calling the BO directly, which accepts a dataset as part of the method parameters. In the adapters though, I’ve noticed that they often have a different set of parameters to call the same method than the BO does.
Thanks again, been pulling my hair out on this one!
Actually if you look at the trace with the Changes Only Option it will show you the dataset which fields changed. So that means those fields need to be set before the method call is made.