How to Withold SENDING certain Purchase Orders marked with STRING e.g. ##nopo##

This question was sent to us by Connor J.

Dear Docentric Experts,

What scripts or coding within Docentric can I use to WITHOLD the sending of an email which contains (for example) the string ‘##nopo##’ in the PO Description field??

Hi Connor,
You can do the following with out-of-the-box Docentric AX, which would work in both the Free and Full Editions:

  1. Create a Print management settings for Purchase orders with Docentric Email print destination. This will be the default way to send Purchase orders.
  2. Then create a Print management override on each Purchase order that shouldn’t be sent by email and set a different Print destination. Such documents won’t be sent by email if printing is done using Print management settings.

If you don’t like the above solution, you can create a customization in the Data Source Provider (DSP) class in Docentric pipeline for Purchase orders in which you programmatically check the presence of the string of characters in the PO description and prevent it from being sent by e-mail if these characters are present.