I figured it out. This works: letter =SalesFormLetter::construct(DocumentStatus::PackingSlip);
letter.salesTable(salestable); letter.initParameters(letter.salesParmUpdate(),PrintOut::Current); letter.createParmUpdate(); ParmId = letter.parmId(); letter.initLinesQuery(); dialog = letter.dialog(); dialog.run(); dialog.wait(); if (dialog.closedOk()) letter.run(); --- In development-axapta@yahoogroups.com, Tony Zeigler <tony_zeig...@...> wrote: > > It appears your trying to replicate what's in salesformletter.main & > salesformletter.run > Â > All I can say is there is a ton of code behind those two things. I'd suggest > putting a breakpoint at the top of salesformletter.main, then calling it > normally and tracing through each line that is called during a normal call. > Then figure out how to replicate each call. > Â > Basically, I think your missing quite a bit of the setup needed to accomplish > what your attempting. > Â > Good luck! > > --- On Tue, 2/9/10, branjema <branj...@...> wrote: > > > From: branjema <branj...@...> > Subject: [development-axapta] SalesEditLines > To: development-axapta@yahoogroups.com > Date: Tuesday, February 9, 2010, 9:38 PM > > > Â > > > > Please help! > > I'm trying to call the saleseditlines form but I can't get the lines to > polutate. > > Here's my code: > > SalesFormLetter letter=SalesFormLet ter::construct( DocumentStatus: :Invoice) > ; > salestable sale; > queryrun qr; > > sale = SalesTable:: find('SO00033276 '); > > letter.salesTable( sale); > letter.transDate (systemDateGet( )); > letter.specQty (SalesUpdate: :All); > > letter.initLinesQue ry(); > > letter.initParamete rs(letter. salesParmUpdate( ), > PrintOut::Current) ; // Printout > > letter.createParmUp date(); > > letter.specQty( salesUpdate: :All); > > letter.prompt( ); > > > > > > > > > > > > [Non-text portions of this message have been removed] >