Invent closing slow

The following added indexes did the trick for us:

InvenSettlement

  • SettleTransIdx (set as ClusterIndex on table properties)
    1. SettleTransId
    2. Cancelled
    3. SettleType
    4. QtySettled

InventTrans

  • InventRefTransIdx
    1. ItemId
    2. ValueOpen
    3. InventRefTransId
  • StatusIssueIdx
    1. ItemId
    2. ValueOpen
    3. StatusIssue
Advertisements

Delete Reference by code

public void ADU_DeleteReference()
{
    #AOT
    #Properties
    TreeNode        referencesNode;
    TreeNode        referenceNode;
    SysReference    existingReference;
    ;

    referencesNode  =   TreeNode::findNode( #ReferencesPath );

    if( referencesNode )
    {
        referenceNode = referencesNode.AOTfindChild( "REFERENCE_NAME" );
        referenceNode.AOTdelete();
    }
}

modifiedField and Array (like Dimension)

How to find that yuo have modified a Dimension ?

In your modifiedField method, add this :

    switch(fieldExt2id(_fieldId))
    {
        case fieldNum(LedgerJournalTrans, Dimension):
// Put your code here.
            break;
    }

OR , if you want test a specific Dimension, you can use this :

    switch (_fieldId)
    {
        //Standard case ...
        
        case fieldId2Ext(fieldNum(LedgerJournalTrans, Dimension), 1)://1 you index of the array
            //Put your code
            break;
    }