Hi Syner,

One suggestion here. You need not create two classes. The same class can be
used for both batch operations and non-batch operations.

If you want the task to run in batch then you just need to go to 'Batch'
tab, select the 'Batch processing' check box and specify 'Batch group'. You
can also setup other settings like email, recurrence etc.

If you do not want to run the task in batch ensure that the 'Batch
processing' check box and 'Batch group' in the batch tab are cleared.

You can have a look at following classes to get an insight into this:
Tutorial_RunBaseBatch, CustInterestCreate or CustInterestCancel.

One more thing, you can also override method canGoBatch and depending on the
caller you can return a true or a false. If a true is returned batch tab
will be enabled. If a false is returned the Batch tab will be hidden

Hope this helps.

Regards,
Sumit

On Tue, Nov 25, 2008 at 12:09 PM, Syner P <[EMAIL PROTECTED]> wrote:

>    Hi,
>
> We have to develop a simple function to calculate item net weights from
> several company specific tables. But I am not sure about the code placement
> and class structure.
>
> As the function directly related with InventTable. It should reside on it.
> And we need two new classes using this function.
> One batch enabled in Periodic, the other is on the Form InventTable which
> cannot be run batch.
>
> Our solution was extend runbasebatch and disable running batch and put this
> to the form.
> Another class inherited from this class which can go batch and override run
> for using the query.
>
> Any hint or similar sample from the standard app will be appreciated.
>
> Syner
>
>
>
> 
>

Reply via email to