I have made sure the prerequisites for the capable to promise functionality have been set up, it seems to work with some items but when trying to process a configurable item (after configuring it), I am getting the error below. Does the CTP function work with configurable items? - if not, is there a work around of some sort?
Best answer by Yuriy Zaletskyy
I’m not sure, why this question is asked in customizations section, but based on the fact, that we have customization branch of the community, here is my thought process:
Step 1, find the error message in Visual studio:
Step 2, find the constant ConfirmChangeSourceDeleteConfigResults usage in the same way, and below goes the code:
protected virtual void AMProdItem_DetailSource_FieldVerifying(PXCache cache, PXFieldVerifyingEventArgs e) { var row = (AMProdItem)e.Row; if (row != null) { var newSource = (int?)e.NewValue;
if (newSource == ProductionDetailSource.Configuration && row.Function != OrderTypeFunction.Disassemble) { if (!ItemConfiguration.IsConfiguratorActive) { e.NewValue = ProductionDetailSource.NoSource; e.Cancel = true; }
if (row.IsConfigurable != true || row.Function == OrderTypeFunction.Disassemble) { cache.RaiseExceptionHandling<AMProdItem.detailSource>(row, e.NewValue, new PXSetPropertyException(Messages.NotConfigurableItem)); e.NewValue = row.DetailSource; e.Cancel = true; }
Validations can be interpreted as: if not running through import/API, the user is prompted with the text of constant. Since .Ask method throws an exception, you see the error on mass processing screen.
So, one of the ways, could be create a customization, that will padd this validation.
executed, it means that there was an attempt to put a new value into DetailSource. I have guess, that maybe in Prod Order DetailSource was not configuration, but something else.
I’m not sure, why this question is asked in customizations section, but based on the fact, that we have customization branch of the community, here is my thought process:
Step 1, find the error message in Visual studio:
Step 2, find the constant ConfirmChangeSourceDeleteConfigResults usage in the same way, and below goes the code:
protected virtual void AMProdItem_DetailSource_FieldVerifying(PXCache cache, PXFieldVerifyingEventArgs e) { var row = (AMProdItem)e.Row; if (row != null) { var newSource = (int?)e.NewValue;
if (newSource == ProductionDetailSource.Configuration && row.Function != OrderTypeFunction.Disassemble) { if (!ItemConfiguration.IsConfiguratorActive) { e.NewValue = ProductionDetailSource.NoSource; e.Cancel = true; }
if (row.IsConfigurable != true || row.Function == OrderTypeFunction.Disassemble) { cache.RaiseExceptionHandling<AMProdItem.detailSource>(row, e.NewValue, new PXSetPropertyException(Messages.NotConfigurableItem)); e.NewValue = row.DetailSource; e.Cancel = true; }
Validations can be interpreted as: if not running through import/API, the user is prompted with the text of constant. Since .Ask method throws an exception, you see the error on mass processing screen.
So, one of the ways, could be create a customization, that will padd this validation.
executed, it means that there was an attempt to put a new value into DetailSource. I have guess, that maybe in Prod Order DetailSource was not configuration, but something else.