The following code in a BPM’s Exec Custom Code widget will work.
Db.POHeader.Where( r =>r.Company == callContextClient.CurrentCompany && r.PONum == 48919).FirstOrDefault().PurchasedFor_c="BPM Update";
Db.Validate();
Just put your variable in for the PO Num and change the name of the UD field.
CAUTION!! This writes directly to the DB bypassing any BO logic. It’s practically like using SQL to modify the DB. A misconfigured expression might cause multiple records to update. You should only do this as a last resort.
And because the UI will disable that field, you’ll probably need to make an updateable dashboard or some other way to allow the user to enter the new value, that the BPM will use.