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
XavXav 

How to load Bulk Api Jobs using SOQL

Hi,

 

I am trying to build a custom page, that display "Bulk API Jobs" in a data grid. I am using the following statement :

 

List<AsyncApexJob> jobs = [SELECT Id FROM AsyncApexJob];

 but it does not return anything. And when i go the page "https://xxxx.salesforce.com/750?setupid=AsyncApiJobStatus" i see my job in status "Open". 

Is it possible to do this kind of query on Bulk Jobs ? If not, is there a way to embeded the "Bulk Jobs List" inside a custom apex page ?

 

Xavier

Yoganand GadekarYoganand Gadekar

you can redirect to the "bulk data load jobs page" usign pagereference object.

 

Visit this example for more on pagererence, Pagereference example

Thanks,

XavXav

Hi,

 

i know but that is not what i m looking for.

 

Xavier

Avidev9Avidev9
Seems something wrong with the page or code.
I have done something similar in past and it works!. AsyncApexJob is queryable

Well I just did a simple query using developer console and results were returned.
Here is a screen http://awesomescreenshot.com/0801fo687f
XavXav
Hi,

Yes it works for non < Bulk API Jobs >, that's my point.

Xavier
Avidev9Avidev9

Well I we missed the documentation about the AsyncApexJob object it says

 

"Represents an individual Apex sharing recalculation job, a batch Apex job, or method with the future annotation."

Sébastien RichardSébastien Richard
Hi, have you find a solution to your problem because i am in the same situation ?
Thanks