Change company in batch server processing running

when running batch processing in server side for different branch codes(i am using changecomapny() in fetch method)

‘that means it fetch the data for different branches and send the mail’.

so when running the batch processing in server side i got one error.

The error i pasted below.

Stack trace: The company does not exist.

\Reports\DailyTrialBalanceInput\Methods\fetch - line 14
\Classes\ReportRun\run
\Classes\SysReportRun\run - line 26

\Classes\DailyTrialBalanceInput\run - line 11
\Classes\BatchRun\runJobStatic - line 62

could please asset me why this error will happing it is urgent for me.

Thanking you.

Hi Amarala,

What is the value you are passing inside changecompany?

If the value u passed is blank, you will get this error.

Add an extra if to check if the value you are passing is not empty to stop this error, like

if (company)
{
changeCompany(company)
{
}
}

Hope this helps.

Thank you Ahmed i wrote same condition now it is working.