misc charges creation by x++

Hi all first of all I have created a sales order manually and a sales order was created with number SO00000696

and then ran a job like for misc charges to be applied in the sales order

static void miscchargesonsalesorder(Args _args)

{

MarkupTable markupTable;

MarkupTrans markupTrans;

SalesTable SalesTable;

Salesline Salesline;

;

SalesTable = SalesTable::find(‘SO00000696’);

markupTable = markupTable::find(MarkupModuleType::Cust,“CDI”);

markupTrans.clear();

markupTrans.MarkupCode = markupTable.MarkupCode;

markupTrans.initFromSalesTable(SalesTable);

markupTrans.initFromMarkupTable(markupTable);

markupTrans.initValue();

markupTrans.Value = 100.00;

markupTrans.insert();

}

then I did a sales order invoice then i got a error like

You have not assigned financial dimensions according to your account structure in the sales order.

Yep Rohit,

The error is no where related to miscellaneous charges.

You have to select the mandatory financial dimensions (which is specified in Account Structure in GL) then the error will go away.

Regards,

Rahul Dhandha