Hi all! I've got a user event script generating a random unique identifier on POs for external use when they print or email POs. Unfortunately, they're almost entirely creating POs as drop ship POs for Sales Orders via the native Approve button on the SO. When the button is clicked the PO User Event is triggered but it won't run my function to generate the random unique identifier. It doesn't get past the if here:
if ([context.UserEventType.CREATE, context.UserEventType.COPY, context.UserEventType.DROPSHIP].includes(context.type)) {
const extPoNum = generateExternalPO();
}