-
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 5 years ago by
Deepak.
-
This discussion was modified 5 years ago by
Log In to reply.
Popular Salesforce Blogs

What is the benefit of integrating Marketing Cloud with Whatsapp?
Introduction In today's digitally connected world, effective marketing is all about meeting your audience where they are. WhatsApp, with its over two billion active users,…

Lead Management and Lead Conversion in Salesforce
1. What is a Lead? A lead is an individual or organization that has shown interest in your products or services. Leads are potential customers…

How Integrated CRM Payment Solution can Help Nonprofits | Salesforce Solutions
If your fundraising team is spending hours monthly to manually import and export data from the increasing payment providers, then they are definitely doing it…
Popular Salesforce Videos
Learn DML Statements in Salesforce Development
In this video, We'll be learning about DML (Data Manipulation Language) in Salesforce development: We will be discussing the following things in this video: 1.…
4 Myths About Salesforce
Salesforce is a platform that helps businesses track the journey their customers take. It can help you effectively track and monitor your marketing and sales…
TrailheaDX '18 Opening Keynote - Part 3: Connect Every Experience
Salesforce TrailheaDX ’18 Opening Keynote – Part 1: Create Connected Customer Experiences TrailheaDX ’18 Opening Keynote – Part 2: Salesforce Platform Salesforce TrailheaDX ’18 Opening…