I am using like below . Is it the correct way. GlEntry is of Record DataType with SubType G/l Entry
Company - OnPreDataItem()
Company - OnAfterGetRecord()GlEntry.RESET;GlEntry.CHANGECOMPANY(Company.Name);
GlEntry.SETRANGE("Posting Date", 0D, AsOfDt);
Looks ok to me.
Below is the documentation if you are interested.
Business Applications communities