I’m currently in the thralls of debugging an Epicor function that will create a new quote. At this point, I am only trying to create a Quote Header and save it with the next quote number, but I keep running into an error message that says A valid customer is required
I followed the trace log of creating a new quote and copied all the business objects and methods that were used and put them in order in my code. See below.
var ds = new Erp.Tablesets.QuoteTableset();
// **************************************
// Creating the quote by pressing new
// **************************************
//< businessObject > Erp.Proxy.BO.QuoteImpl </ businessObject >
//< methodName > GetNewQuoteHed </ methodName >
this.CallService<Erp.Contracts.QuoteSvcContract>(x => {
x.GetNewQuoteHed(ref ds);
}
);
//< businessObject > Erp.Proxy.BO.TaskSetImpl </ businessObject >
//< methodName > GetByID </ methodName >
this.CallService<Erp.Contracts.TaskSetSvcContract>(x => {
x.GetByID("DEFAULT");
}
);
// **************************************
// Entering the Customer
// **************************************
//< businessObject > Erp.Proxy.BO.QuoteImpl </ businessObject >
//< methodName > ValidateECCType </ methodName >
string errorMessage = "NULL";
this.CallService<Erp.Contracts.QuoteSvcContract>(x => {
x.ValidateECCType("8", out errorMessage, ref ds);
}
);
// I can only get up to this point without the customer invalid error getting thrown
//<businessObject>Erp.Proxy.BO.QuoteImpl</businessObject>
//< methodName > GetCustomerInfo </ methodName >
this.CallService<Erp.Contracts.QuoteSvcContract>(x => {
x.GetCustomerInfo(ref ds);
}
);
These are the errors I’m getting. The out errorMessage
arg from x.ValidateECCType
returns an empty string.
The error occurs in the last code block using x.GetCustomerInfo
… I have also tried writing the corresponding CustNum (from CustID) directly to the dataset using ds.QuoteHed[0].CustNum = 31
but receive the same error.
I am very stumped on how to get a valid customer. Any help on this would be extremely appreciated.