Monday, 14 October 2019

how to add field to listpage (make it sortable and filterable) not a field in datasources in it.

1. Create a view (CITCustTransView )
2. Add to the form as new datasource ( Outer join) to the data source which it can be linked.
3. Add link to view and existing data source through code.


[Extensionof(formDataSourceStr(CustopenTrans,CITCustTransView ))]
final class CITCustOpenTrans_Extension
{
    public void init()
    {
        QueryBuildDataSource  queryDataSourceLink;
        next init();
        queryDataSourceLink  = this.query().datasourcetable(tablenum(CITCustTransView));
        queryDataSourceLink.addlink(fieldNum(CustTrans,Invoice),fieldnum(CITCustTransView,InvoiceId));
        queryDataSourceLink.addlink(fieldNum(CustTrans,TransDate),fieldnum(CITCustTransView,InvoiceDate));
        queryDataSourceLink.addlink(fieldNum(CustTrans,Voucher),fieldnum(CITCustTransView,LedgerVoucher));
        queryDataSourceLink.addlink(fieldNum(CustTrans,AccountNum),fieldnum(CITCustTransView,InvoiceAccount));

    }

}

1 comment:

  1. Do you need Finance? Are you looking for Finance? Are you looking for finance to enlarge your business? We help individuals and companies to obtain finance for business expanding and to setup a new business ranging any amount. Get finance at affordable interest rate of 3%, Do you need this finance for business and to clear your bills? Then send us an email now for more information contact us now via (financialserviceoffer876@gmail.com) whats-App +918929509036 Dr James Eric Finance Pvt Ltd Thanks

    ReplyDelete