Hi Experts,
Which role I have to override to prevent deleting posted BOM Journal.
Hi Experts,
Which role I have to override to prevent deleting posted BOM Journal.
From where the quantity taking from purchparmline table. My Purchase order quantity is 20 (PO unit BOX/10 and Inventory unit Each. Unit conversion is also there as 1 BOX/10 = 10 EACH) . IN Purchline table QTYORDERED =200, REMAINPURCHPHYSICAL =20, REMAININVENTPHYSICAL 200
Inventtranstable QTY = 200.
I registered the item and registered quantity is also showing 200 but when I click product receipt and choose registered then Quantity is showing 2000 instead of 20 as below screenshot
When I select Ordered quantity then quantity is showing correct (22) as below screenshot
Thanks for your valuable answer
Avinash Moosa
Hi All,
I'm facing problem as above.
Is there anyone can help ?
Thanks
Hi,
I appreciate if anybody could help me to get this code working. What I am aiming to is to post purchase invoice for the received quantity. I also want to pass the invoice reference number to the posted invoice which I have not found out how to do.
First of all I am getting the error below, then I have commented a few lines in my code where I am not sure what are the correct parameters.
Error Message (11:07:31) List object not initialized.
Stack trace
(S)\Classes\PurchFormletterParmDataInvoice\fillOutputContract - line 5
(S)\Classes\formletterParmData\createData - line 59
(S)\Classes\PurchFormletterParmDataInvoice\createData - line 3
(C)\Jobs\postInvoiceTest - line 24
staticvoid postPurchaseInvoice(Args _args)
{
PurchFormLetter purchFormLetter;
PurchFormletterParmData purchFormLetterParmData;
PurchParmUpdate purchParmUpdate;
PurchParmTable purchParmTable;
PurchParmLine purchParmLine;
PurchTable purchTable;
PurchLine purchLine;
PurchId purchId;
Num invoiceId;
purchId = "DK01-1349";
invoiceId = "Inv_DK01-1349";
purchTable = PurchTable::find(purchId);
ttsBegin;
// Create PurchParamUpdate table
purchFormLetterParmData = PurchFormletterParmData::newData(
DocumentStatus::Invoice,
VersioningUpdateType::Initial);
purchFormLetterParmData.parmOnlyCreateParmUpdate(true);
purchFormLetterParmData.createData(false);
purchParmUpdate = purchFormLetterParmData.parmParmUpdate();
// Set PurchParmTable table
purchParmTable.clear();
purchParmTable.TransDate = SystemDateGet();
purchParmTable.Ordering = DocumentStatus::PackingSlip; // what should be here, I want to invoice only the lines that have been received into stock?
purchParmTable.ParmJobStatus = ParmJobStatus::Waiting;
purchParmTable.Num = invoiceId;
purchParmTable.PurchId = purchTable.PurchId;
purchParmTable.PurchName = purchTable.PurchName;
purchParmTable.DeliveryName = purchTable.DeliveryName;
purchParmTable.DeliveryPostalAddress = purchTable.DeliveryPostalAddress;
purchParmTable.OrderAccount = purchTable.OrderAccount;
purchParmTable.CurrencyCode = purchTable.CurrencyCode;
purchParmTable.InvoiceAccount = purchTable.InvoiceAccount;
purchParmTable.ParmId = purchParmUpdate.ParmId;
purchParmTable.insert();
// Set PurchParmLine table
whileselect purchLine
where purchLine.PurchId == purchTable.purchId
{
purchParmLine.InitFromPurchLine(purchLine);
purchParmLine.ReceiveNow = PurchLine.receivedInTotal(); // I want to invoice all the received lines, is this correct?
purchParmLine.ParmId = purchParmTable.ParmId;
purchParmLine.TableRefId = purchParmTable.TableRefId;
purchParmLine.setQty(DocumentStatus::Invoice, false, true); // OK?
purchParmLine.setLineAmount();
purchParmLine.insert();
}
purchFormLetter = PurchFormLetter::construct(DocumentStatus::Invoice);
purchFormLetter.transDate(systemDateGet());
purchFormLetter.proforma(false);
purchFormLetter.specQty(PurchUpdate::ReceiveNow); // OK???
purchFormLetter.purchTable(purchTable);
purchFormLetter.parmParmTableNum(purchParmTable.ParmId);
purchFormLetter.parmId(purchParmTable.ParmId);
purchFormLetter.purchParmUpdate(purchFormLetterParmData.parmParmUpdate());
purchFormLetter.run();
ttsCommit;
}
Hi Faiz7049,
Could you please fill the VAT Registration number for your company and define the VAT rate.
Hi Experts,
VAT is working in Sales Order as well as Purchase Order but not working in Payment Journal.
Does any step I am missing?
Hi,
Just trying to setup XDS security in the On Hand forms (Stock and warehouse) / Common / On Hand Stock so I can only see on hand stock for certain warehouses.
If I use the advise above using the InventDIm as a primary table in the query, linked to the inventlocation and the range in the inventlocation and then adding the InventSum as a constrained table I get an error in the InventSum if I try to post any transaction, for example. It says the recrod already exist.
If in the constrained node, in the InventSum table I set the property "Contrained" to no, I see lines for all warehouses in the On Hand form.
I don't see how I can filter by the InventLocationId in the On Hand Stock form without contraining either InventSum or InvenDim
Hi, dear colleagues!
Trying to create XDS policy with warehouse restrictions to users, of course, created Query with InventLocation Policy with constraint table InventDim, InventSum etch.
When we choose only Insert,Update, Delete it works. In this case user can't select restricted Warehouse (by InventLocationId from InventLocation) , but can see InventSum and other related information, what we don't wish.
But otherwise (All operations, Select) it not works
So, because user can't see all invent dim dimension with this warehouse trying to insert non-non-Unical record to InventDim throws error : Cannot insert record, InventDimId-xxxx, RecId xxxx already exists.
Direct query with InventDim also not helped.
Who can help, any idea?
Thanks in advance!
Hi,
Just trying to setup XDS security in the On Hand forms (Stock and warehouse) / Common / On Hand Stock so I can only see on hand stock for certain warehouses.
If I use the advise above using the InventDIm as a primary table in the query, linked to the inventlocation and the range in the inventlocation and then adding the InventSum as a constrained table I get an error in the InventSum if I try to post any transaction, for example. It says the recrod already exist.
If in the constrained node, in the InventSum table I set the property "Contrained" to no, I see lines for all warehouses in the On Hand form.
I don't see how I can filter by the InventLocationId in the On Hand Stock form without contraining either InventSum or InvenDim
Hi Muhammad,
So, the person is able to see all warehouses in the lookup, but is not allowed to select some? What exactly have you configured as constrained tables and what form do you want to restrict this behavior? Can you explain the full functional requirement?
Dear All,
I have created security policy to ristrict the Warehouse in Entire AX from the following link.
dynamicserppros.com/restricting-user-view-microsoft-dynamics-ax-2012
But When i select the property Operation in Security polices with All Operations [OR] Select, It won't display and won't load in Lookup some of the wareshouse based on the Query which is selected in that security policy.
But I want to display all wareshouse in Grid, and ristrict to select in that lookup itself over the AX. I tried with Insert [OR] Insert, Update and Delete in Operation property of Security policy. But It won't work. Can anyone give idea to ristrict the Warehouse in Warehouse Lookup?
Thanks.
I need to calculate labor charge for finished goods (items not going through a production line) for when a worker picks, packs and ships a part. How is this possible in dynamics AX 2012?
Thank you,
Hi all,
i'm tring to run a report during the posting of a ledger journal table to print a proforma invoice for a vendor. In AX 2012 it worked by customizing the post VendVoucher.post() method calling the the report by menuFunction. So in 365 i have extened the VendVoucher this way:
[ExtensionOf(ClassStr(VendVoucher))]
final class PAC001aVendVoucher_Extension
{
public void post(LedgerVoucher _ledgerPostingJournal,
CustVendTrans _vendTrans,
NoYes _approval,
UnknownNoYes _euroTriangulation,
boolean _withHoldTaxType,
boolean _useSubLedger)
{
ledgerJournalTable ledgerJournalTable;
ledgerJournalTrans ledgerJournalTrans;
;
ttsbegin;
next post(_ledgerPostingJournal, _vendTrans, _approval, _euroTriangulation, _withHoldTaxType, _useSubLedger);
if (common.TableId == tablenum(LedgerJournalTrans))
{
LedgerJournalTrans = common;
ledgerJournalTable = LedgerJournalTrans.ledgerJournalTable();
}
if(ledgerJournalTable.PAC001aPrintProforma)
this.PAC001aCommissionPrintJournal(vendInvoiceJour);
ttscommit;
}
void PAC001aCommissionPrintJournal(vendInvoiceJour _vendInvoiceJour)
{
Args args;
;
_vendInvoiceJour.Proforma = NoYes::Yes;
args = new Args();
args.name(identifierStr(PurchInvoiceOriginal));
args.record(_vendInvoiceJour);
new menuFunction('PAC001aAgentProformaInvoice', MenuItemType::Output).run(args);
//new menuFunction('PurchInvoiceOriginal', MenuItemType::Output).run(args);
throw error(strFmt("%1 %2", "@SYS119253",_vendInvoiceJour.vendName()));
}
}
where the throw error is needed beacuse i want to rollback the process after the report has printed to screen.
In Ax 365 this gives me the error :
"Stack trace: Cannot run form on non interactive session"
Someone can halp me to print the report and rollback as i can do in ax 2012?
Hi guys,
I have generated a customer ageing report for october but I get some different data compared to the report that I generated for august. See the screenshots below. The report header changed from last AUG report generation. I need the report to look like the one that I generated for Aug. No matter how I choose backward or forward , the Oct report only shows the ageing data of Aug, Sep and Oct. What’s more, it is show the ageing data of Nov. Up to the end of Oct , I need to know many AR overdue and their ageing, not in the future how many AR will overdue.
The Oct report shows the ageing data of 2017/08/01, 2017/08/02-2017/08/31, 2017/09/01-2017/09/30, 2017/10/01-2017/10/30, and 2017/10/31. As you can see the report generates data for 2017/11/01-2154/12/31. What does it mean and how can I change the setting to generate a report that looks like the one i generated for august. Please see the screenshots below.
Thanks
You should do little bit research on how you can use that function . Your code should be
Changecompany("Dat")
{
Your code
}
Hi Friends,
How can we create Customer for an single legal entity in ax 2012 through x++ coding .
Thanks& Regards,
padmapriya.v
Hi Javier,
Magic1949 shared a link of the same question on the community. This has information that you should use more policies with different purposes. Try to follow that suggestion as it is key in being able to solve your error.
Hi,
I'm trying to implement XDS security or RLS in the Invent Dim / Invent Sum. The goal is to limit the access to the On Hand Stock based on InventLocation.
That's working fine but it has knockout effect which is the users can't then post transactions (Purchase Order receipts, Transfer Orders, etc) in the system, not only against that particular warehouse.
Have you ever came accross this issue before?
Hi Andre,
I do understand the logic of creating different policies, however, my problem is as soon as I implement security on the On Hand form, the users lost the ability to insert / update in the InventSum or InventDim. I think I've tried all combinations. Either the InventSum or the InventDim need to be constrained in order the policy to work, and once you constrain one of them, you can't update / post any transactions. Unless I'm missing something
Hi Javier,
You created another post with this question. Please do not duplicate your questions. Let's continue on your original thread: community.dynamics.com/.../256962