very great way of practical implementation , now i understood how to do callouts from future , pls post the link which you did for anonymous window callout and setting up of named credentails
Can I use Queueable instead of future to make call-out here? If so is there any difference or drawbacks. Also the call-out is inside a for loop , so i think this isn't best practice, so can you please guide me with the best practices here
I have a requirement that when a account inserts via data loader for each 200 records and if Phone number is not null, then the phone number field is validated from integration by making call-out and another checkbox field is updated based on call-out. So since each trigger has size of 200 records. But the maximum call-out allowed per transaction is 100. How to achieve this?
Hi "We get token from third party where we save it and if it expire what will be our logic ? how we achieve in our code?" i am getting these question mostly ,please help me how can i answer for this question
@@namanshetty2781 trigger exectues immediately but the callouts are made or we get the response of callout after some time hence we use it, also to make callout u need to use future with callout = true or database.allowcallouts
@@salesforcein5minutes Thanks for the clarification. But what if the response takes more than 60 seconds, let's say 180 seconds which is exceeding the CPU time of asynchronous Apex i.e 60 seconds also exceeds maximum time to get a callout response i.e. 120sec?
Is it required to edit named credentials every time if we want to callout, please clarify it for example i logout ang login again after some time is work fine or i need to edit and save named credentials again
You can just edit the named credentials and save it without any updation it will navigate you to the target website where you will be able to validate once more to send and receive the data
@@salesforcein5minutes Thanks for asking brother. It's about wring a test class for an apex callout and about implementing MockFactory for the test cases. It is so confusing what's happening over there. just for your reference check the trailhead unit on Apex REST callouts. Thanks