ERROR:Argument '_number' is incompatible with the required type.

I have the code for Updating Purchase Order Invoice in My Customized Form in write Method to update the posting into Invoice from That Customized Form .

PurchFormLetter_Invoice invoice;

// Purchtable purchtable;

//CITPickUpReconcil _CITPickUpReconcil;

;

super();

purchTable = PurchTable::find(_CITPickUpReconcil.PONumber);

invoice = PurchFormletter::construct(DocumentStatus::Invoice);

invoice.update(purchtable,

SystemDateGet(),

PurchUpdate::All,

AccountOrder::None,

false,

true);

But its throwing error Argument ‘_number’ is incompatible with the required type.

near line :invoice.update()

please help me out…

Hi,

It’s normal. The PurchFormLetter.update() method expects to receive the following parameters :

(Common _source,

Num _number,

TransDate _transDate = this.transDate(),

PurchUpdate _specQty = PurchUpdate::All,

AccountOrder _accountOrder = AccountOrder::None,

NoYes _proforma = this.proforma(),

NoYes _printFormLetter = this.printFormLetter(),

NoYes _usePrintManagement =

false,

NoYes _creditRemaining = this.creditRemaining(),

container _packedTmpFrmVirtualList = conNull())

Regards

Hello pawan,

In the invoice.update() method - you are missing one parameter, that is reason it is showing up that error.

static void Job1(Args _args)
{
PurchFormLetter_Invoice invoice;
PurchTable purchTable;
;
purchTable = PurchTable::find(‘000447’);
invoice = PurchFormletter::construct(DocumentStatus::Invoice);
invoice.update(purchtable,‘15,<need to pass the invoice number - this is missing in the code>
SystemDateGet(),
PurchUpdate::All,
AccountOrder::None,
false,
true);
}

Thanks Buddy…

Thankuuu…