You need to sign in to do that
Don't have an account?
John Gerhard
Create Object From XML
Hello,
Okay, I have played with Apex and built a few triggers/classes and they have worked perfectly I have also made them bulkified and I am getting pretty savvy there.
My next project is to receive an XML file from an external source, parse that xml file and create a custom object called Verification. Inside this object we have a few fields called phone number, status(picklist), and name(text field.) So I did the trail heads for API beginner and a few of the advanced one, the problem I am running into is that I can't find anything that teaches me how to recieve a file, process it, and create an object. Everything I can find is send out a request and then get the response from the request and blah blah... So I have no idea where to even start with this one. I am pretty sure I need to use the SOAP API, other then that I am not sure how to send the file to SalesForce, or how to process the file to match what SalesForce needs to create the record. I think if I can get some help for those first two parts I can easily knock it out from there.
I think optimally what I am looking for is a tutorial of how to recieve the XML file like what credentials do I need to give to the sender, how to see how the file looks coming in, and then how to parse it to make sense to SalesForce.
Thank you,
Okay, I have played with Apex and built a few triggers/classes and they have worked perfectly I have also made them bulkified and I am getting pretty savvy there.
My next project is to receive an XML file from an external source, parse that xml file and create a custom object called Verification. Inside this object we have a few fields called phone number, status(picklist), and name(text field.) So I did the trail heads for API beginner and a few of the advanced one, the problem I am running into is that I can't find anything that teaches me how to recieve a file, process it, and create an object. Everything I can find is send out a request and then get the response from the request and blah blah... So I have no idea where to even start with this one. I am pretty sure I need to use the SOAP API, other then that I am not sure how to send the file to SalesForce, or how to process the file to match what SalesForce needs to create the record. I think if I can get some help for those first two parts I can easily knock it out from there.
I think optimally what I am looking for is a tutorial of how to recieve the XML file like what credentials do I need to give to the sender, how to see how the file looks coming in, and then how to parse it to make sense to SalesForce.
Thank you,
The Salesforce objects can be updated via Metadata. The good news is the metadata for objects is an XML file, so depending on the contents of your file it would be feasible to use an XSLT to convert to the Salesforce XML definitions.
I suggest you please refer the below link.
http://www.salesforce.com/us/developer/docs/api_meta/api_meta.pdf (http:// http://www.salesforce.com/us/developer/docs/api_meta/api_meta.pdf )
Hope it will be helpful.
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar