The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
51 views

Using @future tag on Apex Webservice but code not executing asynchronously

With the winter '15 release over the weekend some mission critical code for us is now getting the infamous "Apex CPU time limit exceeded". It worked fine for the past 8 months until this release. (as ...
1
vote
1answer
27 views

FTP SSL documentation for Batch File Export (Bulk Async) Call is wrong. Can't get it to function

Output for a Batch File Export (Bulk Async) Call is Below is what we are finding in trying to make use of this: The documentation for enabling FTP SSL does not work. Documentation Link: ...
5
votes
1answer
70 views

How to test @future methods with setup objects and avoid MIXED_DML_OPERATION

I’m in a situation where I have to use a future method to avoid MIXED_DML_OPERATION error. I have a trigger that runs after INSERT on USER and creates a custom object X. They are in 1:1 relation. ...
0
votes
0answers
7 views

ResultDetailXML in response from async create calls

We are having a problem obtaining detailed results from asynchronous calls. The CreateOptions object includes a flag for IncludeResults var options = new CreateOptions { QueuePriority ...
0
votes
0answers
2 views

ExactTarget encrypted WCF connection returning unencrypted response

We are trying to establish encrypted async communication with the WCF service according to instructions given in the documentation. We are able to send encrypted messages which are received and ...
2
votes
1answer
51 views

Async Apex & Fault Tolerance

Trying to see if I can make Async Apex jobs fault tolerant; meaning if they fail can I implement some sort of retry logic? What would this retry mechanism look like and is there any documentation or ...
3
votes
1answer
57 views

Invocation of scheduled class : starts - schedules - completes without a trace. No debug log

I've got an Apex Class that implements System.Schedulable which I'm trying to run: public class Broker { //... public class Worker implements System.Schedulable { public void ...
0
votes
0answers
18 views

System.CalloutException: public-proxy20-0-chi.data.sfdc.net

Never seen this error before. It's occurring sporadically when calling an asynchronous call from a Batch. This code has been executing without this issue for years on the same scheduled job. Seems ...
3
votes
3answers
80 views

How to estimate how long a given batch will run?

Are there any reliable numbers, heuristics, experience reports to estimate (and display it to the triggering user) how long a given batch will run? Sure the time will mainly depend on the number of ...
2
votes
1answer
64 views

Can a DML retry solve UNABLE_TO_LOCK_ROW race conditions?

I have 2 Batch classes working on different child objects of a common master object. Batch Batches are started parallel to speed up this long running cleansing operation. It depends on the underlying ...
1
vote
1answer
89 views

System.AsyncException: No enclosing class for method: methodName

I have this error that says "System.AsyncException: No enclosing class for method: methodName". The code structure : trigger trgSendRecords on DataSetup__c (after insert) { /* SOME BUSINESS ...
1
vote
1answer
131 views

Asynchronous Calls: Order Of Execution In A Test Method

Imagine the following scenario: Trigger myTrigger on User calls a future method which flags Account records. Then a Batch Job must run to process the records. While testing, I am first inserting ...
7
votes
2answers
109 views

What does the Batch Apex “Holding” status mean and where is it documented?

I've seen the following values in the AsyncApexJob table during the 'cradle to grave' life cycle of a Batch Apex job: BEFORE running: Queued Preparing WHILE running: Processing AFTER running: ...
2
votes
1answer
61 views

How can I get the details of last schedulable job and of which class? Is there any way?

I have a requiurement where I have to get the details of last job details and the Of which clas s. How can I get the details ? i have tried using CronJob details and CronTrigger?
6
votes
1answer
112 views

Do triggers run asynchronously when triggered by DML in apex?

The question is fairly self-explanatory, but to add a little background, here's the scenario that has made me ask. First a (very basic) SSCCE: public void createAttachments(List<Account> ...
4
votes
1answer
212 views

How can I synchronize processing in Apex?

I have a custom Object TaskEvent with an Event Type and a Task ID Throughout the life-cycle of the task I will receive events such as Start Event Routing Event End Event I receive a web request ...
7
votes
1answer
3k views

Using Batch Apex on millions of records

Part of our app behaviour is going over millions on records and updating their data. From what I read, we can do it using Batch Apex although I am not certain I fully understand how it works. Here ...
4
votes
1answer
259 views

Batch execute is slow because of huge unused gaps in DevConsole timeline

I have a long running batch that is taking days to execute and creates millions of records. To speed it up I used the profiling tools of the Developer Console. Per batch execute() I see this timeline ...
1
vote
0answers
82 views

Why does this Batch always and only abort in Production?

I have a long running asynchronous process that process millons of records in a CustomObject__c. To prevent other limits we have split this into 2 Batch classes that work on this table in parallel. So ...
1
vote
2answers
127 views

Why do batches behave different in Production than in a Sandbox

Recently I observed serious and undocumented differences in the runtime behaviour of Sandbox vs. Production orgs, e.g.: Batches (same code, same data) run faster in the Sandbox Same Batch in Sandbox ...
3
votes
1answer
719 views

Does Test.stopTest() cause ALL waiting asynchronous functions to fire?

For practice, I'm composing on a unit test for a Schedulable class: /** * Example of scheduling Apex Batch Processing * @see Apex Workbook, page 68 **/ global class WARE_CleanMerchandiseScheduler ...
4
votes
3answers
207 views

Tracking errors in batch impossible as Dev Console stops logging or breaks with Server error

When single batch jobs fail only the last one is party shown in the Apex Logs page. This is not enough for debugging. A better way ist to check the log entries that are written per batch execute. ...
4
votes
1answer
119 views

Is there any way to unit-test that a function will run into a LimitException?

I need to write a test that verify that a function call is run synchronously. As I have found no elegant way to find that out I now let my function run into a Limit which is an indirect proof that ...
5
votes
3answers
823 views

Build Custom Batch Queue to centrally manage Batches & circumvent the Max. 5 Batches in parallel

Just assume you had an app that would have to process huge amounts of records in an org in multiple ways each day. For each "way" you have a separate Batchable class and those are triggered ...
4
votes
3answers
532 views

How to best structure code so it can be run synchronously and in Batch

This question is somewhat related to my other open question on the asynch/synch topic. Assume I would have an algorithm that could tell me that for a given customer org (data volumes and other ...
2
votes
2answers
333 views

Button redirects page before async call is finished in another field

I am really confused as to how to solve this issue I have on a visualforce page. Basically I have a pageblock table with some Opportunity Products displayed. On the onchange event of the fields in the ...
2
votes
1answer
96 views

Heuristics to decide if to run an operation sychronous or asynchronous

Im our app we recently had to switch many operations from short running synchronous calls to asychronous Batch or future calls. It helps us overcome the many limits but also introduces many other ...
4
votes
2answers
791 views

Rerender apex:details after DML async method call

I have found a strange behaviour and I can't find why does it happening. I have custom object Test2_c with custom text field Status_c. I want to change it's status asynchronously, so I prepare a VF ...
0
votes
1answer
542 views

ActionFuntion Rerender in VF page leads to sudden “Insufficient Privileges” - even as Admin

To make a VF component appear to load faster I used an actionFunction to load it only after the rest of the pages has loaded (jquery's document.ready). After doing this my component showed an ...
1
vote
1answer
788 views

Examples of using queryAsync in SOAP API?

I've been looking around online for examples for using queryAsync() in the SOAP api, but I can't seem to find any. Can someone using Async calls using the SOAP WSDL api in C#?
3
votes
3answers
3k views

JavaScript Remoting on Standard Page Layout

I have a couple of JavaScript remoting functions used to count records and to display that count to the end user. The JavaScript remoting functions are on a Visualforce page, and the Visualforce page ...
8
votes
2answers
720 views

Batch Apex in AppExchange package and orgs with related triggers that call @Future methods

Here's the problem: when an org has a trigger that calls an @Future method, any batch Apex that fires that trigger will fail, since you cannot call an @Future method from an @Future method OR from ...