hi Cenk
 
I have not looked @your code but an easy way to do this is to set up inter-company and insert the following code at the end of the "WriteJournal" method of class "SalesFormLetter_packingSlip".
 
    if (custPckSlpJour.interCompanyUpdateAllowed())
        custPckSlpJour.interCompanyUpdate();

regards
 
harry

Cenk Ince <[EMAIL PROTECTED]> wrote:

Hi all;

We have 2 company ntr and spk. When i post a salespackingslip in "spk", i want to post purchpackingslip in "ntr".
I wrote a job below, it works in "ntr" company without redlines, when i run it in "spk" company with redlines it doesn't work.

Why can it be?
In class purchformletter\run method, there is a while, it "ntr" company it gets into while, but in spk(with red lines) it doesn't get into while.

while (Query.next())


static void defterenakil(Args _args)
{
    PurchTable p;
    PurchFormLetter_Invoice purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
    ;
    changecompany("ntr")
    {
        select p where p.PurchId == "00000342_056";
        purchFormLetter.update(p,"A-114663",systemDateGet(),PurchUpdate::All,AccountOrder::None,NoYes::No,NoYes::Yes);
    }

}

Thanks..

Cenk ƯNCE


Sharing the knowledge on Axapta.


Yahoo! Mail
Stay connected, organized, and protected. Take the tour

Sharing the knowledge on Axapta.



Yahoo! Groups Links

Reply via email to