Automating Receipt Entry Reference Field

Hello,

I’m looking to populate a reference field in the receipt entry with a button click, so that an external document software can reference the data.

I’m using this code to generate data, but I’m unable to populate the text field or update the table value. Can someone point me in the right direction for updating this database?

This is the reference field I’d like to populate with a button click:

Thanks guys!

You’ll want to set the dataview value rather than the textbox text value

3 Likes

Look at the epibinding of the txtReference control.

It will be DataViewName.Field.

Then get the epiDataView as Aaron suggests:

var edv = oTrans.Factory("DataViewName");
edv.dataView[edv.Row]["Field"] = "My text";
oTrans.NotifyAll();
2 Likes

That seemed to work well, now to figure out how to pass that in a BPM when doing Mass Receipts (or any receipt entry for that matter)

That shouldn’t be too complicated, should it?

Thanks guys!

Your BPM Call Context should have an EDV on your form as well.

var edv = oTrans.Factory(“CallContextBPMData”);
edv.dataView[edv.Row][“Chracter01”] = “My text”;
edv.dataView[edv.Row][“Number01”] = 1.23m;

1 Like

I got it to work!

Looks like it is working with Mass Receipt as well!

Thank you guys!

1 Like

Well . . I’ve run into my first concern item, I’m not sure how to fix.

I changed the BPMs to a post processing BPM on the ReceiveAllLines and GetNewRcvDtl methods.

The Mass Receipt looks fine, and worked well as it assigned the same value for the reference for all the line items (It was a Mass Receipt for 35 or so items)

Can I modify the BPM for the GetNewRcvDtl to use the previous transaction reference of the matching packing slip and PO?

So if I’m doing a receipt for more than one line (not a mass receipt), the first line would generate a reference, and then any other lines added to it would use that same reference, so each line is not unique.