Thursday, July 10, 2025

Miscellaneous code

 1) Dimensions  view :- To get all dimension values use this views

DimensionAttributeLevelValueAllView  ---ldger 

DefaultDimensionView   ------------------------default 


---------------------------------- 

2) To access Global declared buffers in methods 

Use "element.buffer" by  this one can get all buffers from global level.  

 

Note:- By just using element. You won't see the buffers list , just copy and paste and save you will see no errors 


-------------------------------------------------------------------------

3) To insert data in TempDB table use snippet shown in below:-


 LedgerVoucherTransAuditLogDetailTmp tembuf;

 str note = "today test";

 ttsbegin;

 tembuf.GeneralJournalAccountEntry=5637144XXX;

 tembuf.Description="Manitest";

 tembuf.doinsert();

 ttscommit;

---------------------------------------------------------------------------------

4) To get user fullname from shortname 

code:-

HcmWorker::find(HcmWorker::userId2Worker(wfTracking.user)).name();

Note:- here wfTracking.user is the buffer i am using

No comments:

Post a Comment

computed column in Dataentity

synatx:-    public static server str methodname()   {       str purchid=SysComputedColumn::returnField(dataentityviewstr(Dataentityname),d...