Enter Sales Orders and Quotes / Customizer

SOLVED

Hello!

A textbox has been added to Maintain Customer so that we can add custom notes. We would like to have these notes displayed in the Enter SO and QO task when the customer is selected. 

I added a textbox and did a databind on custkey between my custom table and tsosalesorder. Unfortunately it doesn't pull the data from our custom table until the sales order is saved and opened again. 

Anybody know what we can do to make the information display when the customer is selected? 

  • 0 in reply to Ralph.

    thanks ralph! your script helped me. we can now populate a custom text field on a task window. Yes

    Sub lkuCustID_LostFocus

           dim terms

           terms = ""

           Dim sSql

           Dim rs

           sSql = "Select coalesce(freightterms,'') as 'freightterms' "

               sSql = sSql & " from tarcustomer a (Nolock) join aaa_tarCustomerCustomFields_EXI b (nolock) on a.custkey = b.CustKey "

               sSql = sSql & " where CustID = '" & Form.Controls("lkuCustID") & "' "

           Set rs = Session.AppDatabase.OpenRecordSet(sSql,1,0)

           rs.moveFirst

           if not rs.iseof then

               terms = rs.field("freightterms")

               if terms <> "" then

                   Form.Controls("txtFreightTerms").text = terms

                   'msgbox terms

               end if

           end if

           rs.close

           set rs =  nothing

    End Sub

  • 0 in reply to sabian

    and thanks to everyone else who contributed. it's great to have such a valuable resource. Idea