-
What other method we can apply to access id instead of giving direct id in Salesforce?
public class sample { public Boolean batchStatusBool {get;set;} public String batchStatus {get;set;} public integer batch1 {get;set;} public integer batch2 {get;set;} Id batchId; public Boolean pollerBool {get;set;} public sample() { batchStatusBool = false; pollerBool = false; } public void callAcctUpdateBatch() { batchStatusBool = true; updatecontact obj = new updatecontact(); checkBatchStatus(); } public void checkBatchStatus() { AsyncApexJob job = [SELECT Id,totaljobitems,Status,NumberOfErrors FROM AsyncApexJob WHERE Id ='7072w000002G7IP']; batchStatus = job.Status; batch1 = job.totaljobitems; batch2 = job.NumberOfErrors; if(batchStatus == 'Completed') { pollerBool = false; } else { pollerBool = true; } } }What other method we can apply to access id instead of giving direct id?
-
This discussion was modified 6 years, 9 months ago by
Deepak.
-
This discussion was modified 6 years, 9 months ago by
Log In to reply.
Popular Salesforce Blogs
Salesforce Einstein: The Beacon of Business Growth
Businesses need more than just the right services and products to stand out in the market. Strategical use of data is paramount to promote quality…
The Benefits of Outsourcing Salesforce Admin Services for Agile Business Management
Agility is not just a fancy word in today's business world; it is a requirement. Businesses are always on the lookout for new and creative…
4 Reasons to use AngularJS in Salesforce Visualforce pages
If you ask a web or mobile app developer why they use AngularJS their first reply would be because it’s awesome. And then they would…
Popular Salesforce Videos
What is Sales Cloud in Salesforce? | How it can Help Any business?
In this video, Shrey is not only teaching but also demonstrating the concept of Sales Cloud in Salesforce. 1. What is sales cloud in Salesforce?…
Salesforce Agentforce for Nonprofits
With Salesforce's latest AI tool, Agentforce, you can boost your Salesforce org with AI agents that can streamline workflows, reduce costs, and improve your constituent…
Stephen Merity - Really Quick Questions with a Salesforce Researcher
Stephen Merity is a senior research scientist working on deep learning in San Francisco with Salesforce Research via the MetaMind acquisition. He's been lucky enough…