REST API with XML and JSON Both in Same Apex Class

In Previous Example , have explained how to do REST API separately with XML and separately with JSON. if we want to create both in same class and when third party use either of these to call from salesforce how we can create apex in salesforce explaining in this blog post. For this first we … Continue reading REST API with XML and JSON Both in Same Apex Class

REST API with XML&JSON for Request and Response in Salesforce

In Previous Example I created records using Post Method from workbench. Now from this blog post am explaining how to do create record using xml/JSON with RestAPI using work bench. Go to workbench -> Rest explorer -> Select Post radio button.and give the URL something like this ==> /services/apexrest/v1/AccountMgmt/ as per your url mapping in … Continue reading REST API with XML&JSON for Request and Response in Salesforce

Apex Test Class for Apex Triggers

Before deploying a trigger, write unit tests to perform the actions that fire the trigger and verify expected results. Let’s test a trigger that we worked with earlier in the Writing Apex Triggers unit. If an account record has related opportunities, the AccountDeletion trigger prevents the record’s deletion. Apex Trigger trigger AccountDeletion on Account (before delete) { … Continue reading Apex Test Class for Apex Triggers