web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Unpacking print job settings not identifying printerName

(0) ShareShare
ReportReport
Posted on by 1,312

In AX2009, I created a class where I pass packed PrintJobSettings from table.field   ProdParmStartup.SetupPrintPickList.

When I instantiate new printJobSettings in my class run method, a new printerName is set with my default printer. What I'm having trouble with is assigning the packed container from ProdParmStartup. What I've got:

public void run(PrintJobSettingsPacked          _pjsPacked)

PrintJobSettings    ps;

ps = new PrintJobSettings(_pjsPacked); // debug shows contents of pjsPacked same as ProdParmStartup

info(ps.printerPrinterName);    //shows my default printer

// alternatively

ps.unpackPrintJobSettings(_pjsPacked);
info(ps.printerPrinterName());    //shows my default printer

So it looks like the unpackPrintJobSettings does not unpack. What am I missing?

*This post is locked for comments

I have the same question (0)
  • reachnaidu Profile Picture
    890 on at

    In the code above, what were you expecting the printerPrinterName() to be after you unpack. The initial printer shows default and after Unpack shows the default.. Am i missing some thing here ?

  • Mark Prouty Profile Picture
    1,312 on at

    I am wanting the printer job settings that are passed to the parameter _pjsPacked that are from ProdParmStartup.SetupPrintPickList. The class has a get/put method parmPrintJobSettings that is getting the field contents.

  • Suggested answer
    reachnaidu Profile Picture
    890 on at

    if you have your own class that implements PrinterJobSettings .. you might have to look at this URL with section "Using RunBaseBatchPrintable class"

    http://waikeatng.blogspot.com/ .. See if it helps you.

  • Community Member Profile Picture
    on at

    Hi Mark,

    I have exactly the same problem.

    Did you find a solution ?

    Thanks

  • Verified answer
    Mark Prouty Profile Picture
    1,312 on at

    So, I put this aside for some weeks now, and on revisiting it, I found that I was actually sending printJobSettings.printerSettings(), not printJobSettings.packPrintJobSettings() into the _pjsPacked parameter. It seems so obvious and I feel so silly. Thanks, Sree, for your helpful pointers.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans