-
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 4 years, 10 months ago by Deepak.
Log In to reply.
Popular Salesforce Blogs
All You Need to Know About Salesforce Governor Limits
The concept of Salesforce Governor Limits exists because Salesforce and Apex run in a multi-tenant environment. In this article, I will explain what Governor Limits…
Salesforce Incident Management Solution In Service Cloud: Quick Guide
From system outages and data breaches to product malfunctions, the way organizations respond can make all the difference in maintaining customer trust, ensuring operational continuity,…
5 Best CRM Integrations with QuickBooks for SMBs 2022
It's crucial that your CRM and QuickBooks work together. Due to this, most CRMs on the marketplace have acted and offered a method to integrate…
Popular Salesforce Videos
Salesforce Lightning Tutorial - How to Delete Records from Server
In this particular video you'll learn how to delete records from custom Salesforce Lightning Component using Apex Controller Method.
How Easy (or Difficult) is it to Transition from Salesforce Classic to Lightning Experience?
This video answers the question of: How Do You Transition Your Company from Salesforce Classic to Lightning Experience? ▪️ How difficult is it? ▪️ How long should…
Salesforce Validation Rules - Keep your Data Clean
Watch this short video for just over 2 minutes and learn how to keep your Salesforce data clean? The answer is simple: Use field validation…