Is it possible to search within the SO Detail "Comment" field for a particular word to post-write a check mark in a UDF field?
If it is a header field, you can do it in either the post-write as Kevin M stated above or in the pre-write as I showed above, and just use the header object instead of what I did above.
instead of:
rVal…
if you use a pre-write script you should be able to change your udf.
'pre-write so sales order detail rVal = 0 commentString = "" searchString = "xyz" rVal = oBusObj.GetValue("CommentText$", commentString…
Great thanks guys, just wrote my first script!
A post-write script cannot change data on the record just written, but in a line post-write you should be able to update a header UDF.
if you use a pre-write script you should be able to change your udf.
'pre-write so sales order detail rVal = 0 commentString = "" searchString = "xyz" rVal = oBusObj.GetValue("CommentText$", commentString) If InStr(commentString, searchString) then rVal = oBusObj.SetValue("UDF_CheckBox$", "Y") End if
I haven't tested this, but I think that should work. Assuming the UDF is in the same detail record.
E
But the UDF is in the SO header not the detail, so where would you reference the SO Header table.
If it is a header field, you can do it in either the post-write as Kevin M stated above or in the pre-write as I showed above, and just use the header object instead of what I did above.
instead of:
rVal = oBusObj.SetValue("UDF_CheckBox$", "Y")
use:
rVal = oHeaderObj.SetValue("UDF_CheckBox$", "Y")
Great thanks guys, just wrote my first script!
Hopefully that BOI award will reach you soon. (or a box of cookies)
Congrats!
*Community Hub is the new name for Sage City