for %A in (*.dll) do regsvr32 /u /s %A && regsvr32 /s %A
Jumat, 25 November 2016
Register all .dll in one folder
you can use this :
Kamis, 17 November 2016
Query Join AX 2012 Version 2
public void executeQuery()
{
QueryBuildDataSource cpj;
QueryBuildDataSource bol;
query query;
query = CustPackingSlipJour_ds.query();
cpj = query.dataSourceTable(tableNum(CustPackingSlipJour));
bol = cpj.addDataSource(tableNum(WMSBillOfLadingOrder));
bol.joinMoIde(JoinMode::ExistsJoin);
bol.fetchMode(QueryFetchMode::One2One);
bol.relations(false);
bol.addLink(fieldNum(CustPackingSlipJour, SalesId), fieldNum(WMSBillOfLading, InventTransRefId));
super();
}
I tried the same in a job and it worked:
static void Job21(Args _args)
{
Query query;
QueryRun queryrun;
QueryBuildDataSource cpj;
QueryBuildDataSource bol;
QueryBuildRange qbr1;
CustPackingSlipJour custPackingslipJour;
WMSBillOfLadingOrder wmsBillOfLadingOrder;
;
query = new query();
cpj = query.addDataSource(tablenum(CustPackingSlipJour));
qbr1 = cpj.addRange(fieldnum(CustPackingSlipJour,orderAccount));
qbr1.value(queryvalue('CUST001'));
bol = cpj.addDataSource(tablenum(WMSBillOfLadingOrder));
bol.relations(false);
bol.joinMode(joinmode::InnerJoin);
bol.addLink(fieldnum(CustPackingSlipJour,SalesId),fieldnum(WMSBillOfLadingOrder,InventTransRefId));
queryrun = new queryrun(query);
while(queryrun.next())
{
custPackingslipJour = queryrun.get(tablenum(CustPackingSlipJour));
wmsBillOfLadingOrder = queryrun.get(tablenum(WMSBillOfLadingOrder));
info(strfmt("%1 - %2",custPackingslipJour.salesid, wmsBillOfLadingOrder.billOfLadingId));
}
}
{
QueryBuildDataSource cpj;
QueryBuildDataSource bol;
query query;
query = CustPackingSlipJour_ds.query();
cpj = query.dataSourceTable(tableNum(CustPackingSlipJour));
bol = cpj.addDataSource(tableNum(WMSBillOfLadingOrder));
bol.joinMoIde(JoinMode::ExistsJoin);
bol.fetchMode(QueryFetchMode::One2One);
bol.relations(false);
bol.addLink(fieldNum(CustPackingSlipJour, SalesId), fieldNum(WMSBillOfLading, InventTransRefId));
super();
}
I tried the same in a job and it worked:
static void Job21(Args _args)
{
Query query;
QueryRun queryrun;
QueryBuildDataSource cpj;
QueryBuildDataSource bol;
QueryBuildRange qbr1;
CustPackingSlipJour custPackingslipJour;
WMSBillOfLadingOrder wmsBillOfLadingOrder;
;
query = new query();
cpj = query.addDataSource(tablenum(CustPackingSlipJour));
qbr1 = cpj.addRange(fieldnum(CustPackingSlipJour,orderAccount));
qbr1.value(queryvalue('CUST001'));
bol = cpj.addDataSource(tablenum(WMSBillOfLadingOrder));
bol.relations(false);
bol.joinMode(joinmode::InnerJoin);
bol.addLink(fieldnum(CustPackingSlipJour,SalesId),fieldnum(WMSBillOfLadingOrder,InventTransRefId));
queryrun = new queryrun(query);
while(queryrun.next())
{
custPackingslipJour = queryrun.get(tablenum(CustPackingSlipJour));
wmsBillOfLadingOrder = queryrun.get(tablenum(WMSBillOfLadingOrder));
info(strfmt("%1 - %2",custPackingslipJour.salesid, wmsBillOfLadingOrder.billOfLadingId));
}
}
Senin, 07 November 2016
AX : Disabled Enabled Button AX 2012 ( Simple Case )
Dalam hal ini saya mempunya form Down Payment..di tabel purchdp_header( custom table), nah saya ingin ketika nomor_dp itu ditemukan di table LedgerJournalTrans maka tombol edit di Form Down Payment menjadi disabled..sebelumnya saya memakai Class Interaction namun saya mencoba cara sederhana dengan menggunakan Class Active di datasource PurchDP-Header di form tersebut..isi class Activenya sebagai berikut :
public int active()
{
int ret;
AmountCurDebit nilaisum;
PurchDP_Header pdph;
LedgerJournalTrans ljth;
//info(PurchDP_Header.Nomor_PurchDP);
ret = super();
select * from ljth where ljth.Nomor_DP==PurchDP_Header.Nomor_PurchDP;
//nomordp=ljth.AmountCurDebit;
nilaisum=ljth.AmountCurDebit+ljth.AmountCurCredit;
// info(int2str(amcd));
if(nilaisum> 0)
{
buttonEditDP.enabled(false);
}
else
{
buttonEditDP.enabled(true);
}
return ret;
}
public int active()
{
int ret;
AmountCurDebit nilaisum;
PurchDP_Header pdph;
LedgerJournalTrans ljth;
//info(PurchDP_Header.Nomor_PurchDP);
ret = super();
select * from ljth where ljth.Nomor_DP==PurchDP_Header.Nomor_PurchDP;
//nomordp=ljth.AmountCurDebit;
nilaisum=ljth.AmountCurDebit+ljth.AmountCurCredit;
// info(int2str(amcd));
if(nilaisum> 0)
{
buttonEditDP.enabled(false);
}
else
{
buttonEditDP.enabled(true);
}
return ret;
}
Langganan:
Postingan (Atom)