A text field displays up to 32,000 text characters.
All VBA field events function for a focusable text field.
VBA uses a string value when referencing a text field. The string value cannot exceed 32,000 characters.
Microsoft Dynamics GP uses text fields primarily in Note windows.
The following example adds a note to an Invoice record when the customer purchases over $2,000. The message added to the text field in the Note window explains that the customer received a 4% trade discount:
Private Sub TradeDiscount_AfterGotFocus() If Subtotal >= 2000 And TradeDiscount = 0 Then 'Click the note button to open the Note window NoteAbsentButtonWindowArea = 2 'Add a message to the text field Note.TextField = "Customer " + Name1 + " purchased " + _ "over $2,000. The trade discount for Customer " + Name1 + _ " was calculated and applied at 4%." 'Click the Attach button to save the note Note.Attach = 2 'Set the trade discount to 4% of the subtotal InvoiceEntry.TradeDiscount = Subtotal * 0.04 End If End Sub