Solved

Shared E-Mail Inbox Causing Duplicate Sales Orders To Be Input - Warning Inadequate

  • 21 January 2022
  • 3 replies
  • 81 views

Userlevel 1

Hello,

Our company has finally joined the 21st century and is using a shared inbox instead of having customers directly message “their favorite” internal sales person their purchase order.  The problem we have been running into is that since multiple people are processing orders from a shared inbox, orders are being duplicated.

While one could argue that there is a prevention system for this within Acumatica, I’m going to argue against that.
 

This is the only warning you receive and it is completely inadequate.  There are so many little yellow warnings all over everything on every single screen it becomes just another part of “warning fatigue.”  We need a very obvious pop-up note or something to make the person entering the order re-think and check to see if the order has already been input.

I realize that “Nathan” is not a proper PO number, however, sometimes you’ll just get a customer that calls or sends over an e-mail and says just use “Nathan” or “Verbal Nathan” as my PO for this order to get it moving.  It happens a lot to us.

Anyways, I’m curious to know if anyone has run into this problem and has come up with a fix/customization that helped them or maybe this has already been implemented in a newer version that we are not currently running.

icon

Best answer by markusray17 21 January 2022, 19:01

View original

3 replies

Userlevel 6
Badge +5

You can make it an error instead of a warning(on the Order Type page) but there isn’t an out-of-the-box way to make it a popup instead. 

If you go the customization route it looks like the business logic is implemented via a CustomerOrderNbrAttribute(could be different depending on your version) so you could extend that attribute and add a popup if the field has an error set and then override the attribute on the CustomerOrderNbr field with your custom one.

 

Below is a quick code sample

 

    public class SOOrderEntryExt: PXGraphExtension<SOOrderEntry> {
public static bool IsActive() => true;

[PXMergeAttributes(Method = MergeMethod.Merge)]
[CustomerOrderNbrExt]
public void _(Events.CacheAttached<SOOrder.customerOrderNbr> e) { }
}

public class CustomerOrderNbrExtAttribute: CustomerOrderNbrAttribute
{
public override void FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e)
{
base.FieldVerifying(sender, e);

HandlePopup(sender, (SOOrder)e.Row);
}

public override void RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
{
base.RowUpdated(sender, e);

HandlePopup(sender, (SOOrder)e.Row);
}

private void HandlePopup(PXCache cache, SOOrder order)
{
if (order == null) return;
if (string.IsNullOrEmpty(order.CustomerOrderNbr)) return;

var fieldState = GetFieldState(cache, order);

RegisterPopupIfInError(fieldState, cache, order);
}

private PXFieldState GetFieldState(PXCache cache, SOOrder order)
{
return cache.GetStateExt<SOOrder.customerOrderNbr>(order) as PXFieldState;
}

private void RegisterPopupIfInError(PXFieldState fieldState, PXCache cache, SOOrder order)
{
if (fieldState?.Error != null)
{
PopupNoteManager.RegisterText(cache, order, nameof(SOOrder.customerOrderNbr), fieldState.Error);
}
}
}

 

Userlevel 1

You can make it an error instead of a warning(on the Order Type page) but there isn’t an out-of-the-box way to make it a popup instead. 

 

Below is a quick code sample

 

 

Hello and thank you for taking the time out of your day to response and help. 

When you say “make it an error” does that mean, it completely negates the possibility of it being duplicated?  We do have customers that use ABC123 as a blanket order number over and over so I’m not sure that we want to completely disable the ability to use a duplicate customer PO#.  We just want it to be significantly more noticeable. 

Unfortunately, for me, I do not understand the coding portion of this (as it is not my forte) but will talk this over with our coding guy and see if this is a viable solution.

Thanks again so much!

Userlevel 6
Badge +5

Yeah an error would prevent saving if the customer order number is exactly the same. You could obviously add an _ or something innocuous to bypass that though. 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved