protected SalesPackingSlipHeaderTmp createReportData() { this.initializeReportData(); custPackingSlipVersion = custPackingSlipVersion::find(this.parmPackingSlipContract().parmRecordId()); custPackingSlipJour = custPackingSlipJour::findRecId(custPackingSlipVersion.custPackingSlipJour); return this.createSalesPackingSlip(); }
protected CustPackingSlipJourRecId retrieveJournalRecId(SalesPackingSlipContract _salesPackingSlipContract) { RecId recId = _salesPackingSlipContract.parmRecordId(); CustPackingSlipJourRecId journalRecId; if (_salesPackingSlipContract.parmTableId() == tableNum(CustPackingSlipJour)) { journalRecId = recId; } else if (_salesPackingSlipContract.parmTableId() == tableNum(CustPackingSlipVersion)) { journalRecId = CustPackingSlipVersion::find(recId).CustPackingSlipJour; } return journalRecId; }Which correctly handles both possible tables.
private CustPackingSlipVersion custPackingSlipVersion; private CustPackingSlipJour custPackingSlipJour;
[Hookable(false), Wrappable(false)] public CustPackingSlipVersion parmCustPackingSlipVersion() { return custPackingSlipVersion; } [Hookable(false), Wrappable(false)] public CustPackingSlipJour parmCustPackingSlipJour() { return custPackingSlipJour; }
If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.
Buy Me a CoffeeNo comments. Be the first one to comment on this post.
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own "buy me a coffee" link.
Join us.