Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

dynamic print OM invoice from button

(0) ShareShare
ReportReport
Posted on by 20

Hi
We are trying to create dynamic print function for OM invoice 40680
from SL6.5 sp1.
By taking sample from http://www.systematicsol.com/Quick%20Print%20Button.htm

 

Private Sub ButtonQuickPrint_Click()

    Dim CmdLine$    'Create a variable to save the command we will use to access the report.

    Dim CustId$, RefNbr$, DocType$  'Create some other variables to store record information.

   

    CustId = GetObjectValue("ccustid")

    RefNbr = GetObjectValue("crefnbr")

    DocType = GetObjectValue("cdoctype")

   

    If Len(Trim(RefNbr)) > 0 Then                                       'Only call the report if there is an invoice number.   

    CmdLine = "ROI.EXE "                                                   'Solomon's report-running program.

    CmdLine = CmdLine + PRMSEP + "08760/RUN"        'Add in the report number we want to run.

    CmdLine = CmdLine + PRMSEP + "08760/FORMAT"              'Add in the format we want to use.

    'The next four lines create the selection criteria.

    CmdLine = CmdLine + PRMSEP + "ARDoc.CustId =" + SParm(CustId) + "And "

    CmdLine = CmdLine + "ARDoc.RefNbr =" + SParm(RefNbr) + "And "

    CmdLine = CmdLine + "ARDoc.DocType =" + SParm(DocType)

    CmdLine = CmdLine + "/WHERE"

    CmdLine = CmdLine + PRMSEP + "/PSCRN"             'Print the report to screen.

    serr1 = Launch(CmdLine, True, True, 0)       'Call the report engine and run a report.

    End If

End Sub


we can print AR invoice but not sure how to pass parameters for OM
invoice (40680) and how to supress the screen of post process with "keep All"
funciton.



If anyone can help?

Cheers,

Luke

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: dynamic print OM invoice from button

    Luke,

    Did you ever receive a response on this question??  Would love to hear it if you did.  Thanks.

    Joe Miller

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans