Salesforce Integration – Creating XML Request using DOM + Custom Settings
Recently I got a requirement from one of my customer where I need to create the XML request and pass the same to a third party application using SOAP protocol. Initially I though it is very easy to do with Apex DOM APIs, but then I came to know that the other party (developer from that Third Party application) change their application quite frequently and as a result they need XML response in a different structure everytime they made some changes. Definitely my customer was very much irritated with this as they need to do code changes every time the other party do the change. So the important part of the requirement was to design something or do something so that with minimum (preferably no code change) changes Salesforce admin can handle the request from other party.Definitely quite a good challenge. Then after some discussion with the other party and Salesforce admin, I designed the application. The most complex part was how to create the XML Request dynamically(without any code change from Salesforce side) with new XML structure requirement.In this post, I will explain how I implemented the logic of creating XML Request with the help of Custom Settings. Yes, you are correct. Custom Settings is so powerful and important that you can play with it in many different ways and this post is one of the way.Let’s get...
Read More