-
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 ago by
Deepak.
-
This discussion was modified 6 years ago by
Log In to reply.
Popular Salesforce Blogs
How to Customize and Deploy your Salesforce Login Page?
After creating your salesforce subdomain. You can create a login page of your own. You can customize your login page so that user need not…
Twilio Integration with Salesforce - 2 Important Techniques
Twilio is a cloud communications platform as a PAAS that allows developers to programmatically create / receive / receive / receive / receive / receive…
Popular Salesforce Videos
Tip Calculator in Lightning Component SalesForce ☁️
In this video, I will create a calculator in Lightning Component. It won't be an ordinary calculator, it will be a Tip calculator for Restaurants…
Building a Custom UI with Lightning Web Components | Salesforce Tutorial
Lightning Web Components is a modern JavaScript framework that leverages the web standards breakthroughs over the past few years. Watch this session to understand how…
How to Nurture Leads in Salesforce Account Engagement? | Forms
Discover how Salesforce Account Engagement (also known as Pardot) helps you create and embed personalized forms, enhancing the lead nurturing experience. To show its capabilities,…