Skip to main content

I would like to dynamically change the color (“Connotation”) of the Confirm Shipment action button (Shipment Entry screen) depending on a condition in 21R2.

Example use case: If the Package Weight is not within an allowable range of the Shipped Weight, then change the Confirm Shipment action button connotation to "Warning". Otherwise, use “Success”. This color change would provide another visual indicator to my fulfillment staff that a shipment is okay to confirm.

I’m currently using the `SOShipment_PackageWeight_FieldUpdated()` event to raise a SetPropertyException, but the warning icon is so small that it’s easily missed. I want to provide more visible feedback to the end-user to help prevent costly packaging errors.

In the 21R2 workflow editor, the color appears to be controlled by the “Connotation” selection.

It does not appear to be possible to conditionally change the connotation of the Action button using the 21R2 workflow editor. How can it be done using code? Maybe using PXScreenConfiguration? I’m unable to find any examples of this online.

Hi @brothe58  You can write a logic in the ROWSelected Event like below and verify.

 

  protected virtual void _(Events.RowSelected<DACNAME> eventArgs)
{
if (eventArgs.Row == null)
return;

if (somecondition)
{
createAndAuthorizePayment.SetConnotation(Data.WorkflowAPI.ActionConnotation.Danger);

}
else
{
createAndAuthorizePayment.SetConnotation(Data.WorkflowAPI.ActionConnotation.Success);

}
}

 

Hope this helps!!


Thanks! Note the Workflow/Customization Project Editor value seems to override whatever value is set via SetConnotation() in code. I had to first remove the Connotation value from the Workflow Editor.


Hi, @brothe58  Hope you have removed connotation from the WorkFlow engine by extending it, and you can able to set the connection through code successfully!!.

 

 


Reply