Point 1. Function name should be follow this pattern: appcode+List+Tablename
Point 2. ID’s fields should be come on top in SQL.
Point 3. All fields of parent table must be available in function.
Point 4. Description of code type fields should be lookup from codewords table.
Point 5. Check & verify all fields which are used in joins and where conditions should be applied indexes in respective tables.
Indexes
Point 6. Check & verify Function's query do not take more time in execution.
Point 7. Check & verify all fields of Function's query do not take more time in execution for this to be avoid columns (i.e. Recvouchnum) pick using sub query like in below function’s sql, In this case if table have records in lac it is causes of taking time.
For this to be avoid taking columns using sub query, we should be taken columns using joins instead of sub query like this :
Point 8. Key field of filter must be available in function which is available in applifilter of views which are based on created function.
Point 9. Include foreign key column in query instead of PK.
Eg: AccvouchItem.GlaccountID instead of Glaccount.GlaccountID.
Point 10. Assigned Require permission to roles: Goto properties and click on Search and select roles by clicking on Browse option & assigned select permission for selected roles.