You shouldn't need to get a handle to the AR_Customer_bus object, there is a numeric property available to the sales order business object called CreditHold so all you need to do is compare if oBusObj.CreditHold = 1 then the customer is on credit hold.
Also, if you are just wanting to display a message in a UDF and don't want it to trigger the prompt to save the record, as long as the UI object is available, you can use oUIObj.SetControlProperty ""UDF_Your_UDF_Name"", ""Value$"", ""Your Message""
Also, when using the SetControlProperty method, you should make sure that you add a $ to the end of the property name if you are setting a string value, don't add the $ when setting a numeric value. In the above example, I want to set a string value into the Value property of the control, since i'm setting a string value i use ""Value$"". If i was wanting to enable/disable the control using this method, i would use ""Enabled"" and use 1 for enabled and 0 for disabled.
Unfortunately, there isn't an event for when a record is released so there isn't a way for you to reset your UDF on that alone. You would have to script additional events to reset it, for example, you would use the Post Read, Post Write, and Post Delete events to handle most events but in the event the user uses the Accept (with no changes to be saved) or Cancel button then you have no way to reset your UDF. One way around this is to use faux Accept and Cancel buttons. Each button would do you routine to reset the UDF and then invoke the real button.