Dear Aji, All,

I have figured it out. The methods initFromSalesTable and 
initFromSalesLine which can be found respectively on the table 
CustInvoiceJour and CustInvoiceTrans handle the initialization of 
the fields in these two tables. These methods are called by the 
method insertProForma(), which is called by the method createJournal
(), which was called by the run() method on the class 
SalesFormLetter.

regards,
Danny Gaethofs
--- In [EMAIL PROTECTED], "Danny Gaethofs" 
<[EMAIL PROTECTED]> wrote:
> 
> Dear Aji, All,
> 
> Thank you for explaining me the use of Docu::copy. I did have a 
look 
> at the method copy but apparently not good enough. I was also a 
bit 
> in a hurry. Thanks for making it clear.
> 
> While I was reading your reply, two questions come up:
> 1. Can you tell me which method copies the data from Table 
SalesLine 
> to CustInvoiceTrans.
> 
> 2. Do you happen to have such a display method available? Just the 
> basic format. Next when do you consider adding the fields to the 
> table CustInvoiceTrans is justified?
> 
> regards,
> Danny Gaethofs
> 
> 
> --- In [EMAIL PROTECTED], Aji Sarosa 
> <[EMAIL PROTECTED]> wrote:
> > Hi Danny,
> > 
> > Not every fields you add to salesLine must also exist
> > in CustInvoiceTrans, unless it is necessary for some
> > reasons. If you want those fields to be printed on the
> > invoice, you can try to modify the SalesInvoice report
> > and add display methods to lookup data from your
> > additional SalesLine's fields.
> > 
> > Docu:copy(SalesLine, CustInvoiceTrans) is used to
> > duplicate a document handling note's record in table
> > DocuRef. This static method doesn't copy entire fields
> > of SalesLine to CustInvoiceTrans, but it duplicates
> > the document note's record belongs to salesLine to
> > custInvoiceTrans' document note. It will then modify
> > refTableId, refRecId, and refCompanyId (data area /
> > company account id) which was previously set specific
> > to salesLine to CustInvoiceTrans. 
> > 
> > Just don't confuse yourself with the term 'copy'.
> > Sometimes you have to examine the codes behind the
> > words. In this case, try to examine the static method
> > copy(..) in class Docu, and analyze what it is doing
> > actually.
> > 
> > As a note, don't use Axapta's table browser to examine
> > data contained in table DocuRef since some field
> > visibilities are set to 'No'. You can set the
> > visibility properties to 'Yes', or if you avoid to
> > change the existing application, browse the table
> > directly from the SQL Server.
> > 
> > Regards,
> > 
> > -Aji Sarosa-
> > 
> > --- Danny Gaethofs <[EMAIL PROTECTED]> wrote:
> > 
> > > 
> > > Dear all,
> > > 
> > > I have added some fields to the salesline table.
> > > These fields should 
> > > be printed on the invoice.
> > > 
> > > The data printed on the invoice is taken from the
> > > tables 
> > > custInvoiceJour and CustInvoiceTrans.
> > > 
> > > These tables same to be populated with the methods
> > > writeJournal and 
> > > writeJournalLine on the class
> > > SalesFormLetter_Invoice.
> > > 
> > > These methods call a static copy method.
> > > For example: Docu::copy(salesLine,
> > > CustInvoiceTrans).
> > > 
> > > Am I correct to assume that when I add the new
> > > fields also to the 
> > > CustInvoiceTables that these are automatically taken
> > > over with the 
> > > copy method. 
> > > 
> > > This method creates a new entry in the second
> > > parameter and copies 
> > > the whole dataAreaId to this new record. I am
> > > assuming that 
> > > dataAreaId includes all the fields on the salesLine
> > > table.
> > > 
> > > Can someone help or confirm my assumptions.
> > > 
> > > Regards,
> > > Danny Gaethofs
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> >             
> > __________________________________ 
> > Do you Yahoo!? 
> > Check out the new Yahoo! Front Page. 
> > www.yahoo.com





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/kGEolB/TM
--------------------------------------------------------------------~-> 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Axapta-Knowledge-Village/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to