mto29
(Mic)
June 19, 2024, 3:28pm
1
Hello all
Does anyone know of an easy way to call in a UD table/field into Custom Code of a BPM please? I’ve highlighted below the issue we are seeing, its not recognizing a UD field maybe because it’s in the ShipHead_UD table but I’ve tried ttShiphead_UD_Row and it doesn’t like that either…
Many thanks for your help !
You have to use the UDField extension of the object
2 Likes
mto29
(Mic)
June 19, 2024, 3:40pm
3
Hi Josec,
Thank you so much, I’ve checked and it tallys up to what is listed in the UD maintenance
Or do I need to call in the UDField extension
See @andrew.johnson 'sresponse here:
We have added a field to APInvHed called PayrollDate_c. We use it for some validations on the lines when an invoice is for one of the temp agencies we work with. Trying to validate when a line on an AP Invoice is entered for one of these suppliers that the PayrollDate field has been populated. Tried a couple things using the objects available in the Method Directives but ended up having no luck and went with code.
PayrollDate = (from APInvHedRow in Db.APInvHed where APInvHedRow.InvoiceNum ==…
3 Likes
knash
(Ken Nash)
June 19, 2024, 3:47pm
5
Based on the above
Try
ttShiphead_Row.UDField<System.String>(“IntPackComments_c”)
Updated part after post
or
ttShiphead_Row.SetUDField<System.String>(“IntPackComments_c”)
6 Likes
mto29
(Mic)
June 19, 2024, 3:59pm
6
Thank you both!! The below worked a charm!
ttShiphead_Row.UDField<System.String>(“IntPackComments_c”)
I just had to switch the variable around so it was on the left.
1 Like
knash
(Ken Nash)
June 19, 2024, 4:05pm
7
left side is being set by the right side. is that what you want?
mto29
(Mic)
June 19, 2024, 4:11pm
8
Oh no… we want the Order Comments to update the IntShipComment field
But when I switch them back around, it asks for a variable
klincecum
(Kevin Lincecum)
June 19, 2024, 4:14pm
9
There should be a SetUDField
I think to do the reverse.
1 Like
knash
(Ken Nash)
June 19, 2024, 4:30pm
10
ttShiphead_Row.SetUDField<System.String>(“IntPackComments_c”)
2 Likes
gpayne
(Greg Payne)
June 19, 2024, 7:17pm
11
this is the syntax
myTTRecord.SetUDField<string>("MyField",myValue); // Will Set it
4 Likes
mto29
(Mic)
June 20, 2024, 9:46am
12
Thank you so much for your help! This worked for me