Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Automatically open Customer Note window

Posted on by 3,954

Is it possible to add VB code to the Customer Maintenance window to have it automatically open the note window if a note exists?

*This post is locked for comments

  • Suggested answer
    Maria Carrero Profile Picture
    Maria Carrero 150 on at
    RE: Automatically open Customer Note window

    Hi Deborah,

    You can add dexterity code from VB code.  In this code you have to use the procedure "call Check_Note_Index"

    This is an example as you can use dexterity code from vb:

    Dim CompilerApp As Object

       Dim CompilerMessage As String

       Dim CompilerError As Integer

       Dim CompilerCommand1, CompilerCommand2, CompilerCommand3 As String

       ' Create link without having reference marked

       Set CompilerApp = CreateObject("Dynamics.Application")

       CompilerCommand1 = ""

       If Not (Iddecliente.Empty) And Not (Iddedirección.Empty) Then

           CompilerCommand1 = CompilerCommand1 & "release table RM_Customer_MSTR_ADDR;" & vbCrLf

           CompilerCommand1 = CompilerCommand1 & "range clear table RM_Customer_MSTR_ADDR;" & vbCrLf

           CompilerCommand1 = CompilerCommand1 & "'Customer Number' of table RM_Customer_MSTR_ADDR = """ & Iddecliente.Value & """;" & vbCrLf

           CompilerCommand1 = CompilerCommand1 & "'Address Code' of table RM_Customer_MSTR_ADDR = """ & Iddedirección.Value & """;" & vbCrLf

           CompilerCommand1 = CompilerCommand1 & "get table RM_Customer_MSTR_ADDR by number 1;" & vbCrLf

           CompilerCommand2 = "if err(table RM_Customer_MSTR_ADDR)=OKAY then" & vbCrLf

           CompilerCommand3 ="{ mis instrucciones};"

           CompilerCommand3 = CompilerCommand3 & "end if;" & vbCrLf

       End If

       ' Execute SanScript

       CompilerApp.CurrentProductID = 0 ' DYNAMICS

       CompilerApp.CurrentProduct = CompilerApp.CurrentProduct & "!Modified"

       CompilerError = CompilerApp.ExecuteSanscript(CompilerCommand1 + CompilerCommand2 + CompilerCommand3, CompilerMessage)

       If CompilerError <> 0 Then

           MsgBox CompilerMessage

       End If

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans