17 Temmuz 2014 Perşembe
AX 2012 - When Developing SSRS Report, if Visual Studio Table Window Disappears?
View->Report Data
AX 2012 - My New Field's Value Disappearing when Editing VendInvoiceInfoTable
I add a new field to VendInvoiceInfoTable When try to edit with VendEditInvoice
form I saw my new field's value is empty. After a long research I found out Axapta copy source record to another record and edit this new record. Meanwhile Axapta skips my new field. Axapta uses table method copyFromHeader while copying. Add my new line:
this.VendorRequestedWorkerEmail = _header.VendorRequestedWorkerEmail;
//my new field
this.myNewField = _header.myNewField;
Problem overed. Same method valid for related VendInvoiceInfoLine table too.
this.VendorRequestedWorkerEmail = _header.VendorRequestedWorkerEmail;
//my new field
this.myNewField = _header.myNewField;
Problem overed. Same method valid for related VendInvoiceInfoLine table too.
Etiketler:
AX,
ax 2012,
AXAPTA,
cannot,
disappear,
lost,
new field,
update,
value,
vendinvoiceinfotable
AX - 2012 What Comes Instead of TypeId?
You'll see TypeId doesn't work at AX 2012. Instead of that AX 2012'de you may use EnumStr for enums and diğer ExtendedTypeStr for other data types.
11 Temmuz 2014 Cuma
AX 2012 - Send marked records to SSRS RDP Report
SSRS DP Class don't accept table or container data types as parm method. I searched at forums and saw str data type adviced. But I think this's not best approach. At last learned best way already in standard AX SSRS reports. At this link there's a PDF file tells look for check report. I generated this report with look form ChequeDP and ChequeController classes:
Controller class:
class declaration:
class myController extends SrsReportRunController
{
#define.ReportName('myreport.Report')
myTMPTable myTMPTable;
}
public static void main(Args _args)
{
SysLastValue SysLastValue;
myController controller = new myController();
controller.parmReportName(#ReportName);
controller.parmArgs(_args);
controller.DeleteTmpData();
controller.init();
controller.startOperation();
}
protected void prePromptModifyContract()
{
SrsTmpTblMarshallerContract contract = this.parmReportContract().parmRdpContract() as SrsTmpTblMarshallerContract;
new SRSReportRunPermission().assert();
contract.parmTmpTableDataRecId(SRSTmpTblMarshaller::SendTmpTblToDataProvider(myTMPTable));
}
public void init()
{
FormDataSource ds;
TransDate transDate;
VendTrans vendTrans;
if (!this.parmArgs() ||
!this.parmArgs().record() ||
this.parmArgs().dataset() != tableNum(VendTrans))
throw error("Report should be call with correct parameter!..");
ds = this.parmArgs().record().dataSource();
vendTrans = ds.getFirst(1);
transDate = vendTrans.transDate;
PaymentReceipt.VendAccount = vendTrans.AccountNum;
for (vendTrans = ds.getFirst(1); vendTrans != null; vendTrans = ds.getNext())
{
myTMPTable.Date = vendTrans.TransDate;
...
myTMPTable.insert();
}
}
DP Class:
// <ETG - memre > GN: T: 11.07.2014 A:
[SRSReportParameterAttribute(classStr(SrsTmpTblMarshallerContract))]
public class mpDP extends SRSReportDataProviderBase
{
myTMPTAble myTMPTable;
}
private void initTmpTable()
{
SrsTmpTblMarshallerContract contract = this.parmDataContract() as SrsTmpTblMarshallerContract;
new SRSReportRunPermission().assert();
myTMPTable = SRSTmpTblMarshaller::getTmpTbl(contract.parmTmpTableDataRecId());
SRSTmpTblMarshaller::deleteTmpTblData(contract.parmTmpTableDataRecId());
CodeAccessPermission::revertAssert();
}
public void processReport()
{
CompanyInfo Company;
VendTable vendTable;
AmountMST amount;
TempStr NumtoTxt;
LedgerJournalTrans LedgerTrans;
this.initTmpTable();
...
}
Controller class:
class declaration:
class myController extends SrsReportRunController
{
#define.ReportName('myreport.Report')
myTMPTable myTMPTable;
}
public static void main(Args _args)
{
SysLastValue SysLastValue;
myController controller = new myController();
controller.parmReportName(#ReportName);
controller.parmArgs(_args);
controller.DeleteTmpData();
controller.init();
controller.startOperation();
}
protected void prePromptModifyContract()
{
SrsTmpTblMarshallerContract contract = this.parmReportContract().parmRdpContract() as SrsTmpTblMarshallerContract;
new SRSReportRunPermission().assert();
contract.parmTmpTableDataRecId(SRSTmpTblMarshaller::SendTmpTblToDataProvider(myTMPTable));
}
public void init()
{
FormDataSource ds;
TransDate transDate;
VendTrans vendTrans;
if (!this.parmArgs() ||
!this.parmArgs().record() ||
this.parmArgs().dataset() != tableNum(VendTrans))
throw error("Report should be call with correct parameter!..");
ds = this.parmArgs().record().dataSource();
vendTrans = ds.getFirst(1);
transDate = vendTrans.transDate;
PaymentReceipt.VendAccount = vendTrans.AccountNum;
for (vendTrans = ds.getFirst(1); vendTrans != null; vendTrans = ds.getNext())
{
myTMPTable.Date = vendTrans.TransDate;
...
myTMPTable.insert();
}
}
DP Class:
// <ETG - memre > GN: T: 11.07.2014 A:
[SRSReportParameterAttribute(classStr(SrsTmpTblMarshallerContract))]
public class mpDP extends SRSReportDataProviderBase
{
myTMPTAble myTMPTable;
}
private void initTmpTable()
{
SrsTmpTblMarshallerContract contract = this.parmDataContract() as SrsTmpTblMarshallerContract;
new SRSReportRunPermission().assert();
myTMPTable = SRSTmpTblMarshaller::getTmpTbl(contract.parmTmpTableDataRecId());
SRSTmpTblMarshaller::deleteTmpTblData(contract.parmTmpTableDataRecId());
CodeAccessPermission::revertAssert();
}
public void processReport()
{
CompanyInfo Company;
VendTable vendTable;
AmountMST amount;
TempStr NumtoTxt;
LedgerJournalTrans LedgerTrans;
this.initTmpTable();
...
}
2 Temmuz 2014 Çarşamba
AX 2012 - Add segmented entry control to a form for a ledger dimension
If you add segmented entry control directly to form you'll see lookups etc.. won't work. Look at the this clear Microsoft's whitepaper:
http://msdn.microsoft.com/en-us/library/hh300644.aspx
http://msdn.microsoft.com/en-us/library/hh300644.aspx
Etiketler:
AX,
ax 2012,
AXAPTA,
control,
form,
ledger dimension,
ledgerdimension,
segmented entry
Kaydol:
Kayıtlar (Atom)