-
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
How DemandBlue Empowered a Non-Profit Property Developer with Salesforce Customization
Why use Salesforce Sales Cloud Salesforce’s Sales Cloud is a top-rated CRM software that helps firms integrate information about leads, sales, and customers and access…
Deployment on Production Environment in Salesforce
When we move any code or component into a production environment we need to keep the below terms for our understanding: These terms are-: Change…
All You Need to know About Salesforce Lightning Component Lifecycle
A Lightning component is instantiated, rendered, and rerendered during its lifecycle. Components are only re-rendered when there's a program or value change that requires re-rendering.…
Popular Salesforce Videos
Top 3 Reasons to Use Salesforce Checkout
Watch this video to understand your Salesforce contract information, make payments, and add additional licenses with Salesforce Checkout. This video discusses about the top 3…
Getting Turn by Turn Directions Between Scheduled Events | Salesforce Maps Mobile
Watch this video to learn how to get turn-by-turn directions between scheduled events in Salesforce Maps Mobile. 00:00 - Introduction 00:19 - Access your Schedule…
Top 5 Benefits of Salesforce Financial Service Cloud
Built on the Salesforce Customer Success Platform, Financial Services Cloud includes an enhanced set of features created specifically for client engagement and designed with the…