How to set Default Order Settings for an Item??
static void Set_DefaultOrderSettings(Args _args)
{
InventTable inventTable;
InventItemInventSetup invent;
InventItemPurchSetup purch;
InventItemSalesSetup sales;
;
delete_from invent;
delete_from purch;
delete_from sales;
while select inventTable
{
if(!InventItemPurchSetup::findDefault(inventTable.ItemId))
{
InventItemPurchSetup::insertDefault(inventTable.ItemId);
}
if(!InventItemInventSetup::findDefault(inventTable.ItemId))
{
InventItemInventSetup::insertDefault(inventTable.ItemId);
}
if(!InventItemSalesSetup::findDefault(inventTable.ItemId))
{
InventItemSalesSetup::insertDefault(inventTable.ItemId);
}
}
}
If you have deleted the Item master and imported with new items then run this job to automatically insert the default order settings for the all items..
Otherwise system will not allow u to create any item transactions it will give error like"No Item parameter for the item"..
Enjoy DAXing :)-
Tuesday, January 17, 2012
Tuesday, January 3, 2012
How to extract Date value from a DateTime field?
How to extract Date value from a DateTime field:
static void getDate(Args _args)
{
System.DateTime _dateTime;
Date _date;
PurchTable _purchTable;
;
_purchTable = PurchTable::find("PO000008");
_dateTime = System.DateTime::Parse(dateTime2str(_purchTable.createdDateTime));
_date = _dateTime.get_Date();
info(date2str(_date,-1,-1,-1,-1,-1,-1));
}
OR
static void getDate(Args _args)
{
System.DateTime _dateTime;
Date _date;
PurchTable _purchTable;
InteropPermission intPerm = new InteropPermission(InteropKind::ClrInterop);
;
_purchTable = PurchTable::find("PO000008");
intPerm.assert();
_dateTime = System.DateTime::Parse(dateTime2str(_purchTable.createdDateTime));
_date = _dateTime.get_Date();
CodeAccessPermission::revertAssert();
info(date2str(_date,-1,-1,-1,-1,-1,-1));
}
OR
Simply :)-
Instead of the third and second last lines you could use:
_dateTime = DateTimeUtil::date(_purchTable.createdDateTime); for the same result.
static void getDate(Args _args)
{
System.DateTime _dateTime;
Date _date;
PurchTable _purchTable;
;
_purchTable = PurchTable::find("PO000008");
_dateTime = System.DateTime::Parse(dateTime2str(_purchTable.createdDateTime));
_date = _dateTime.get_Date();
info(date2str(_date,-1,-1,-1,-1,-1,-1));
}
OR
static void getDate(Args _args)
{
System.DateTime _dateTime;
Date _date;
PurchTable _purchTable;
InteropPermission intPerm = new InteropPermission(InteropKind::ClrInterop);
;
_purchTable = PurchTable::find("PO000008");
intPerm.assert();
_dateTime = System.DateTime::Parse(dateTime2str(_purchTable.createdDateTime));
_date = _dateTime.get_Date();
CodeAccessPermission::revertAssert();
info(date2str(_date,-1,-1,-1,-1,-1,-1));
}
OR
Simply :)-
Instead of the third and second last lines you could use:
_dateTime = DateTimeUtil::date(_purchTable.createdDateTime); for the same result.
Difference between Transfer Journal ,Transfer Order and Stock Transfer?
What is the difference between a transfer journal and a transfer order?
A) With the help of the transfer journal, the Inventory Manager transfers the items from one dimension (warehouse, location, color, etc) to another one instantaneously.
The transfer order is used for registering in the system the items that must be moved from one warehouse to another and for managing this process.
Process Includes:
Create Transfer Order
Pick Items to Transfer->then->Picking list registeration
or
Pick Items to Transfer(No Picking list registeration)
Ship Transfer Order
Receive the Items at other end.
What is the difference between a transfer Order and Stock tranfer?
A) For Indian Localization taxation, Microsoft Included Stock transer.It will Includes taxes on the Item in the transfer Process(Create Stock transfer,Pick,ship,receive)
A) With the help of the transfer journal, the Inventory Manager transfers the items from one dimension (warehouse, location, color, etc) to another one instantaneously.
The transfer order is used for registering in the system the items that must be moved from one warehouse to another and for managing this process.
Process Includes:
Create Transfer Order
Pick Items to Transfer->then->Picking list registeration
or
Pick Items to Transfer(No Picking list registeration)
Ship Transfer Order
Receive the Items at other end.
What is the difference between a transfer Order and Stock tranfer?
A) For Indian Localization taxation, Microsoft Included Stock transer.It will Includes taxes on the Item in the transfer Process(Create Stock transfer,Pick,ship,receive)
Friday, December 23, 2011
Cheque Printing in Ax2009 is very simple
Cheque Printing in Ax2009 is very simple.Already there are classes and reports available in Ax2009.
Just the matter is change the develop the new report(with the help of existing Cheque reports) and code in classes.
First:
Create a new base enum in ChequeFormType(ex:HDFC)
Scond:
List of classes for Cheque:
1.BankPrintTestCheque(for testing the layout of the cheque)
2.BankChequePrint(is the main class for 'Bank Cheque printing')
3.CustVendCheque(calles when vendor payment and customer payemnt->generate payment)
add the code whereever ChequeFormType enum is used :)-
Third:
dublicate the existing report 'Cheque_DK' and rename.
change the design as per the HDFC Bank layout.
Test ur cheque layout process:-
1. select a perticular bank a/c in bank details form under Bank Module.
2. Click setup button->cheque layout.
3. select cheque number as fixed.Select check form as 'HDFC' then click Print test button.
Note: before testing the print layout for hdfc bank need to develop a new report.
The same report is called when u print the report from the vendor payment journal :)-
good luch
Just the matter is change the develop the new report(with the help of existing Cheque reports) and code in classes.
First:
Create a new base enum in ChequeFormType(ex:HDFC)
Scond:
List of classes for Cheque:
1.BankPrintTestCheque(for testing the layout of the cheque)
2.BankChequePrint(is the main class for 'Bank Cheque printing')
3.CustVendCheque(calles when vendor payment and customer payemnt->generate payment)
add the code whereever ChequeFormType enum is used :)-
Third:
dublicate the existing report 'Cheque_DK' and rename.
change the design as per the HDFC Bank layout.
Test ur cheque layout process:-
1. select a perticular bank a/c in bank details form under Bank Module.
2. Click setup button->cheque layout.
3. select cheque number as fixed.Select check form as 'HDFC' then click Print test button.
Note: before testing the print layout for hdfc bank need to develop a new report.
The same report is called when u print the report from the vendor payment journal :)-
good luch
Friday, April 1, 2011
display the current user Name
1) The following code is used to display the current user Name .
display Name userName()
{
return XUserInfo::find(false, curuserid()).Name;
}
display Name userName()
{
return XUserInfo::find(false, curuserid()).Name;
}
display the current user Name
1) The following code is used to display the current user Name .
display Name userName()
{
return XUserInfo::find(false, curuserid()).Name;
}
display Name userName()
{
return XUserInfo::find(false, curuserid()).Name;
}
line numbers in the form
1) In order to generate the line numbers in the form insert the following code in the table insert method:
void insert()
{
LedgerBalColumnsDim lbColumnsDim;
;
if (this.Column == 0)
{
select maxof(Column) from lbColumnsDim
where lbColumnsDim.BalanceSheet == this.BalanceSheet;
this.Column = lbColumnsDim.Column + 1;
}
super();
}
Take the same table instance that is used in the form datasource.
void insert()
{
LedgerBalColumnsDim lbColumnsDim;
;
if (this.Column == 0)
{
select maxof(Column) from lbColumnsDim
where lbColumnsDim.BalanceSheet == this.BalanceSheet;
this.Column = lbColumnsDim.Column + 1;
}
super();
}
Take the same table instance that is used in the form datasource.
Subscribe to:
Posts (Atom)
