You need to sign in to do that
Don't have an account?
Whyser
The main focus of my code is where I have "\r\n". I thought I could use this to add carriage returns or new lines or whatever into the strengths/weaknesses, but after updating, when I look at my results, it displays all the text as one line.
How to enter carriage returns when inserting or updating?
I've been scouring the search option for help on this topic, but there doesn't seem to be any topics in regards to this.
I'm using C# .NET to update the Opportunity Competitor's strengths and weaknesses fields, based on the competitor they have selected from the picklist.
When there is more than one strength or weakness for that competitor, I tried to insert a carriage return to the text.
For example
Code C#:
QueryResult qr = sfdc.query("Select Id, CompetitorName, Strengths, Weaknesses From OpportunityCompetitor Where IsDeleted = false and OpportunityId = '" + OpportunityId + "'"); OpportunityCompetitor[] OppCompetitorList; // Go though all the competitors in the opportunity for ( int i = 0; i < qr.records.Length; i++ ) { // Iterate through each of the Competitor's strengths // competitorHash allows me to do a lookup in my competitors table to retrieve all the strengths and weaknesses for that object for ( int j = 0; j < competitorsHash[OppCompetitorList[i].CompetitorName].Strengths.Length; j++;) { OppCompetitorList[i].Strengths += OppCompetitorList[i].Strengths == "" ? competitorsHash[OppCompetitorList[i].CompetitorName].Strengths[j].Value : "\r\n" + competitorsHash[OppCompetitorList[i].CompetitorName].Strengths[j].Value; } }
The main focus of my code is where I have "\r\n". I thought I could use this to add carriage returns or new lines or whatever into the strengths/weaknesses, but after updating, when I look at my results, it displays all the text as one line.
I'm sure people MUST have run into this problem before. How in the world do you update/insert a carriage return into a multi-line text field???
test Strength 1 test Strength 2 test Strength 3