Profile cover photo
Profile photo
sanjay singh
242 followers
242 followers
About
sanjay's posts

Post has attachment

Microsoft Dynamics AX 2012
Relation between InventTable and InventDim

InventTable --> WHSProductVariantFixedLocation --> InventDim
InventTable.ItemId == WHSProductVariantFixedLocation .ItemId, WHSProductVariantFixedLocation.ProductVariantInventDimId == InventDim.InventDimId

Error executing code: SysFormSplitter_Y object does not have method "formMethodClose" or "formMethodDataSourceCreatePre" or any other number sequence handler method

You must check the loadModule method for EDT. The code must be there. 

MS Dynamics AX 2012 Pick Sales Line
Microsoft Dynamics AX 2012 Pick Sales Line
Pick Sales Line

private void pickSalesLine(salesLine _salesLine, Qty _qty)
{
SalesLine salesLine;
InventDimParm inventDimParm;
InventUpd_Picked inventUpd_Picked;
InventMovement inventMovement;

salesLine = SalesLine::findInventTransId(_salesLine.InventTransId, true);

inventMovement = InventMovement::construct(salesLine);
inventDimParm.initFromInventDim(salesLine.inventDim());

inventUpd_Picked = InventUpd_Picked::newParameters( inventMovement,
salesLine.inventDim(),
inventDimParm,salesLine.inventDim(),
inventDimParm,
_qty);

if (inventMovement.mustBeQuarantineControlled())
{
inventUpd_Picked.parmAllowReservePhysical(false);
}
inventUpd_Picked.updateNow();
}

MS Dynamics AX 2012 Register Purchase Line
Microsoft Dynamics AX 2012 Register Purchase Line
Register Purch Line

static void registerPurchLine(PurchLine _purchLine,
Qty _qty )
{
PurchLine purchLine;
InventDimParm inventDimParm;
InventUpd_Registered inventUpd_Registered;
InventMovement inventMovement;

purchLine = PurchLine::findInventTransId(_purchLine.InventTransId, true);

inventMovement = InventMovement::construct(purchLine);
inventDimParm.initFromInventDim(purchLine.inventDim());

inventUpd_Registered = InventUpd_Registered::newParameters( inventMovement,
purchLine.inventDim(),
inventDimParm,purchLine.inventDim(),
inventDimParm,
_qty);

if (inventMovement.mustBeQuarantineControlled())
{
inventUpd_Registered.parmAllowReservePhysical(false);
}
inventUpd_Registered.updateNow();
}

Post has attachment
Sanjay Singh Live

AX 2012 Resource schedule CLR error
AX 2012 A CLR error occurred while invoking the scheduling engine

Resolution:

1 ) WrkCtrScheduler Class was sending blank entries to Dll method.
DLL : Microsoft.Dynamics.AX.Planning.JobScheduling.JobSchedulingEngineInteropAdapter
Method : AddCommands
2) Deleted Resource entries were sent to mentioned method. Deleted resource was available in ‘Resource Group’ of Resource attached to Production order .
3) Though we delete unwanted Resource from Resource group from UI, it keeps entry in WrkCtrResourceGroupResource (Resource group). After deleting entry, It allows production order to move ahead.



Post has attachment

Post has attachment

ms dynamics ax 2012 X++ job to decrease production order status

Reset Production order status in Dynamics Ax 2012 using x++ code
// Job to reset the production order status via X++
void resetStatusToCreated()
{
    ProdMultiStatusDecrease     prodMultiStatusDecrease;
    ProdParmStatusDecrease      prodParmStatusDecrease;
    Args                   args = new Args();
    ProdTable       prodtable;
    ;
    select ProdTable where ProdTable.ProdId == "ProdId";
    if(ProdTable.ProdStatus > prodStatus::Created)
    {
        args.record(ProdTable);
        select prodParmStatusDecrease where prodParmStatusDecrease.ProdId == ProdTable.ProdId;
        if(!prodParmStatusDecrease.RecId)
        {
            prodParmStatusDecrease.clear();
            prodParmStatusDecrease.initFromProdTable(ProdTable);
            prodParmStatusDecrease.WantedStatus = ProdStatus::Created;
            prodParmStatusDecrease.ParmId = NumberSeq::newGetNum(CompanyInfo::numRefParmId()).num();
            prodParmStatusDecrease.insert();
        }
        prodMultiStatusDecrease = prodMultiStatusDecrease::construct(args);
        prodMultiStatusDecrease.initParmBuffer(prodParmStatusDecrease);
        prodMultiStatusDecrease.parmId(prodParmStatusDecrease.ParmId);
        prodMultiStatusDecrease.run();
    }
}
Wait while more posts are being loaded