Expression Field Returning Error on Batch Job Only - Forum - Rollbase - Progress Community

Expression Field Returning Error on Batch Job Only

 Forum

Expression Field Returning Error on Batch Job Only

This question is answered

Hi all,

I have a field for "Unit Price" that is an expression field.

I also have a batch job that runs every morning to convert certain records into invoices.

The batch job is returning an error because it says that a record is returning an error in the Unit Price field.  Here's the thread from the batch job error message:

rbv_api.createRecord("Invoice_Line1", {
  "R352722689": 354699247, // InvoiceLine's customer should be order's customer
  "R352723810": 354700846, // InvoiceLines order should be this order
  "R352722073": 356183808, // Sync Product Ids
  "Price": ERROR: Error calculating value for Unit Price E... (line #

The issue is that this particular record DOES have a value in the expression field -- if I access view record, it has a price of "0.45."  The trigger words fine if I run it on that record only, and the batch job also works if I trigger it manually.  However, for some reason, it returns this error when it is auto-triggered at 6am every day.

Any ideas what's going on?

 

 

 

Verified Answer
  • Hi,

    Batch Jobs when being auto-triggered run under context of Server Side User. When initiating manually they run under context of Admin User who initiated the batch job.

    Administrator User has got all permissions by default. However, permissions to Server Side User needs to be assigned on demand.

    Can you please check the formula inside expression field, determine if evaluating that permission would need some View/Edit/Create permissions and check if Server Side Role has been given those permissions?

    You may also share the app xml and i will be happy to look into this.

    Thanks,

    Nitin

All Replies
  • Hi,

    Batch Jobs when being auto-triggered run under context of Server Side User. When initiating manually they run under context of Admin User who initiated the batch job.

    Administrator User has got all permissions by default. However, permissions to Server Side User needs to be assigned on demand.

    Can you please check the formula inside expression field, determine if evaluating that permission would need some View/Edit/Create permissions and check if Server Side Role has been given those permissions?

    You may also share the app xml and i will be happy to look into this.

    Thanks,

    Nitin