JobEntry GetList is not working in Customisation

Hello All,

Below Code GetList For getting the JobNumber is not working, can somebody please look into this and help me to resolve this issue.

private void JobGetList()
{
JobEntryAdapter adapterJobEntry = new JobEntryAdapter(this.oTrans);
adapterJobEntry.BOConnect();
bool blnout = false;
string strWherClause = “JobNum=‘123’”;
adapterJobEntry.GetList(strWherClause, 0, 0,out blnout);
}
}

Error:

Compiling Custom Code …

----------errors and warnings------------

Error: CS1501 - line 59 (125) - No overload for method ‘GetList’ takes 4 arguments

** Compile Failed. **

You passed the correct parameters is it was a business object. The adapter takes a SearchOption instead of string and two ints.

            JobEntryAdapter adapterJobEntry = new JobEntryAdapter(this.oTrans);
            adapterJobEntry.BOConnect();
            bool blnout = false;
            string strWherClause = "JobNum =‘123’";
            Ice.Lib.Searches.SearchOptions opts = new Ice.Lib.Searches.SearchOptions(Ice.Lib.Searches.SearchMode.AutoSearch);
            opts.NamedSearch.WhereClauses.Add("JobHead", strWherClause);
            adapterJobEntry.GetList(opts, out blnout);

If you are using a GetList, save yourself time and memory/resources and use the Simple Search Wizard built into the Customization Wizards.

1 Like

Thank you both for the suggestion and help