Monday, 28 March 2022

WhsWorkCreateMovementBasic_Extension In D365

/// <summary>

/// This class is used to extends the base class 

/// </summary>

[ExtensionOf(classStr(WhsWorkCreateMovementBasic))]

final class XDDWhsWorkCreateMovementBasic_Extension

{

    /// <summary>

    /// This method is used to create work

    /// </summary>

    /// <returns>WHSWorkId</returns>

    public WHSWorkId createWork()

    {

        WHSWorkLine   workLineRef;


        ttsbegin;

        WHSWorkId WHSWorkId = next createWork();


        //Create a movement journal 

        XDDCreateMovementJournal  movementJournal = new  XDDCreateMovementJournal();


        select firstonly workLineRef

            where workLineRef.WorkId == WHSWorkId

            && workLineRef.WorkType == WHSWorkType::Pick;

        if (workLineRef.RecId)

        {

            //movementJournal.createjournal("DDS",workLineRef,inventDim);

        }

        ttscommit;


        return WHSWorkId;

    }


}

No comments:

Post a Comment

DefaultDimension in d365 FO X++

 Navigate to PurchTable methods you can find with DefaultDimension this.DefaultDimension = this.mergeDimension(this.getDefaultDimension(),th...