Powered By Blogger

How to update fixed asset dimensions values with the assigned purchase order dimension values Through one button

In button we should follow the flow of whole standard code 

For this take one menuitem button  

Code in class:- 
 

 

 public final class DaxtransferDimensionValues 

{ 

    public static void main(Args args) 

    {         

AssetTable          assetTable; 

        AssetBook           assetBook; 

        PurchTable          purchTable; 

        RecordSortedList    assetBookList; 

        DimensionDefault    defaultDimension; 

        TransferDate        transferDate; 

        TransferComment     transferComment; 

        AssetTransfer       assetTransfer;                

assetTransfer = AssetTransfer::construct();  

assetTable = args.record();            

        assetBookList = new RecordSortedList(tableNum(AssetBook)); 

        assetBookList.sortOrder(fieldNum(AssetTable, RecId));         

        transferDate = DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()); 

        transferComment = "comment"; 

        select purchTable join assetBook  

           where purchTable.PurchId == assetBook.PurchId 

            join assetTable where assetBook.AssetId == assetTable.AssetId; 

        defaultDimension = purchTable.DefaultDimension; 

        assetBookList.ins(assetBook); 

        assetTransfer.transferAsset(assetBookList,defaultDimension,transferDate,transferComment); 

     }   

} 

No comments:

Post a Comment

DisableStandredButton

 My requirement is to disable the delete button for journals that were posted:- After Posting the button is enabled fig:- Line level also th...