function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TechEd_ProgrammerTechEd_Programmer 

How to Parse Data

All -

 

I have created an integration that creates over 2000 records. The reason that it is so high is that I am parsing 2 very large fields on the C# side of the integration. I desperately need to reduce my API calls so the only solution is for me to parse the data in Salesforce. I do not even know where to begin. The data would come in in two very large text fields. Each value in each field has exactly 8 characters after the decimal. I would need to parse and translate these values in pair values that create multiple recors in SFDC.

 

Can someone point me in the correct direction?

 

TechEd

MrTheTylerMrTheTyler

Howdy TechEd,

 

  This is a question of choosing a serialization/deserialization standard.  Have you considered XML or JSON? More info here.

 

 

 

Kind Regards,

 

Tyler Hudson
Contact Us - We Can Help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x123

TechEd_ProgrammerTechEd_Programmer
The data is coming from the C# system in an XML format. The C# plugin I created maps the fields from Salesforce to the data.
MrTheTylerMrTheTyler

Then your next step is to parse the XML-formatted text and pull out the values.  Check out the XmlStreamReader Class.

 

Kind Regards,

 

Tyler Hudson
Contact Us - We Can Help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x123

TechEd_ProgrammerTechEd_Programmer

Ok...situation changed. What I need to do is a bit different. I am getting the data fed directly into SFDC using a WSDL that is being consumed by the C# Plug-In. I am receiving a very long string deliminated by a colon into two fields. What I need to do is to parse the data into multiple records in that object into seperate fields.

 

Any suggestions?

TechEd_ProgrammerTechEd_Programmer

This would also create seperate records for each set of values.