
Hi All,
According to my requirements, I have added a new checkbox in Accounts Receivable parameters under General tab and in SalesParameters table. The checkbox is based on NoYes enum. My logic says that if this checkbox is Yes then 'do this thing' else if checkbox is No, then do other thing.
I do not know how to get the value of that checkbox in my batchjob class and how to workwith it. I have written it like this but it is showing me an error.
SalesParameters salesPara;
salesPara = SalesParameters::find(_salesId);
The error says _forupdate is incompatible with the required type.
As the error, the method expect a single (optional) parameter called _forupdate (boolean_, which says whether the record should be selected for update. You seem to be trying to pass sales ID there, which incompatible and logically wrong. There is just one record in the parameter; it doesn't have a record for each sales ID. This tables represents parameters of the whole module.
If you want to get Accounts receivable parameter, simply call SalesParameters::find().
If you want information about a sales order, use SalesTable instead of SalesParameters.