Hello everyone, asking for assistance
I need to customize behavior of the Shipment screen in status Confirmed (Acumatica 2022R2):
- I need to disable action correctShipmentAction
- I need to enable field SOShipment.shipVia
By default entire screen is disabled in status Confirmed, except ShipmentNbr field
Here’s my code:
void EnableSomeFields(FieldState.IContainerFillerFields states)
{
states.AddField<SOShipment.shipVia>();
}
context.UpdateScreenConfigurationFor(config => config
.WithActions(actions => {
actions.Update(
action => action.correctShipmentAction, (ActionDefinition.ConfiguratorAction actionConfiguration) =>
actionConfiguration.IsDisabledWhen(conditions.ShipmentIsInConfirmedStatus));
})
.UpdateDefaultFlow(flow => {
return flow.WithFlowStates(states => {
states.Update(State.Confirmed, state =>
{
return state.WithFieldStates(EnableSomeFields);
});
});
})
);
Portion that makes action disabled works
Portion that makes fields enabled doesn’t work
Will appreciate your help
Regards,
Andrey
Best answer by abaranovhs
View original