I was wondering if someone could shed some light on a process to create new lines based on some options that are selected in the product configurator. Either user defined method or BPM or function.
These items are not configurable they are stock manufactured parts.
This is doable. We have a user defined method that is called from the document rules of the Configurator. The UD Method basically connects to the Quote BO and fires the appropriate methods that youād see being called when manually creating a new line. It uses the Lookup tables to decide which lines need to be added based on the selections in the Configurator.
So i have found out how to get the line created but i am having an issue getting the right context for a UD field in the QuoteDtl This is in a User defined method (Server)
Totally agree that this is doableā¦ one challenge that I have always run into is that āsomedayā someone will say āWhen we reconfigure, the system is not updating the old lines, but it is creating new onesā. The initial ācreateā is easy, but updating/deleting is the difficult part.
Thereās certainly some extra thought that needs to go into it. Part of our UD method deletes the lines and re-creates them when reconfiguringā¦ but that leads to a new problem. If there are any open jobs tied to the lines, we have to kill those jobs before we can re-configure. So that forced us to also add a check for open jobs in the Configurator so that if there are any jobs tied to any lines, it will not let the user re-configure and instructs them to kill the jobs first. Then, thereās also the point of no returnā¦ where we might require a reconfigure but an order is already partially fulfilled. Then weāre stuck and end up having to write a new order for the remainder. It can be a pain. But for some reason thatās how we like it.
How are you deleting quote lines? Iām trying, but keep getting hung up on the following error:
Exception was found for Document Rule
System.ArgumentNullException: Value cannot be null. (Parameter āfromItemā)
at Epicor.Data.BufferCopy.GetRowCopier(Object fromItem, Object toItem, Boolean fullRowCopy)
From my code:
Erp.Contracts.QuoteSvcContract quoteBO = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.QuoteSvcContract>(Db);
var quoteDS = quoteBO.GetByID(Context.QuoteNumber);
var qRow = (from row in quoteDS.QuoteDtl
where row.QuoteLine == 2
select row).FirstOrDefault();
if(qRow != null)
{
qRow.SetRowState(IceRowState.Deleted);
quoteBO.Update(ref quoteDS);
}