I have a requirement to create subscriber third party API. So here is a requirement before callout:
- I need to do callout for getting the inventory name from thirdparty before creating subscriber.
- Then I need to get the value of subscriber then pass it to create a subscriber.
I'm getting a error in test class System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out.
Please help me because it's a production issue.Any help will be really appreciated. Thank you in advance
Thanks Akshit Jain
Test.startTestandTest.stopTestas per your requirement. – Nagendra Singh Nov 23 '20 at 06:19