-
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, 3 months ago by Deepak.
Log In to reply.
Popular Salesforce Blogs
Create and Insert Record in LWC Without Using record-edit-form | Salesforce Developer Guide
In this blog, we will learn how to create and insert records in Lightning Web Component (LWC) Without Using record-edit-form. Let's create Lightning Web Component…
Resolution of Managed Packages - Salesforce DX Developer Guide
Working with Salesforce DX for the resolution of managed packages: First, we create an org and enable the DX version in it that is DEVHUB.…
Open Web Application Security Project | Salesforce Security Guide
Why Is OWASP Important to You? OWASP represents the Open Web Application Security Project. This open-source project gets the news out about application security weaknesses,…
Popular Salesforce Videos
Salesforce Tutorial - Data Loader Installation On Windows - with Zulu Open JDK
Data Loader is utility to perform bulk database operation. Recently Salesforce has changed the way data loader need to be install. I explain end to…
How to Create Bulk Custom Fields in Salesforce using BOFC App | Salesforce | BOFC | AppExchange
Want to perform multiple operations? This quick video walks you through how to create mass custom fields of any type (Master Detail, Lookup, Formula, Primitive…
Escalation Rule in Salesforce
In this video, Shrey is not only teaching but also demonstrating Escalation Rule in Salesforce. 1. What are Escalation Rules in Salesforce? 2. What is…