function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
luckymeluckyme 

Apex batch stopped working today

Same code worked fine up til yesterday. Anyone else having same problem? The error is 'no such column ... on entity...' but I do have the field on the object.

 

MegatronMegatron

Hey luckyme,

can you please post your batch code?  Thanks

luckymeluckyme

I found out why it was not working: I need to prepend the namespace to the custom object/fields used in queryLocator. Of course I do not know why it worked before yesterday without the namespace.

 

Now I know the problem, I am not sure what is the solution. The problem is there are several developers in our company working on same product but in different orgs (so we do not interfere with each other). Since the namespace must be globally unique, we all have our own namespace. So how do I write my code so that it can work in all the orgs?