Questions tagged [string.format]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 views

Apex-List of string divide into lists of n size

I have a list of string something like below String roleId=105775004,105789004,105809004,105816004,105826004,105844004,105850004,105852004,105863004,105939004,105944004,105953004,105960004,105975004,...
0
votes
1answer
139 views

Issue with Export to Csv when name consists of comma

we are trying to export data into csv file using Apex and Visualforce page in Salesforce . The data is being exported but we have an issue . Here we are exporting record from an object(Text Fields) . ...
0
votes
1answer
21 views

Passing dynamic query strings in the endpoint for the callout

We have been making an call out to an endpoint which till now was just accepting comma separated strings(two values) like /callme?ids='abc,xyz'.I implemented that as shown below and it worked fine: ...
1
vote
1answer
62 views

Is there a way to invoke Salesforce's phone number formatter on a given string?

I want to take all the phone numbers for a given contact in from a SOQL query (which provides the phone number in a raw format) and then have all of the phone numbers in this format as options in a ...
1
vote
1answer
140 views

Parse JSON response

I create a record in one system and that creates the similar record in another and returns the corresponding ID from the destination system which I would to stamp in my source. Deserialized the ...
0
votes
1answer
229 views

Apex Error (Image to PDF conversion) : BLOB is not a valid UTF-8 string

So i have this task where i have to convert the image uploaded in Notes and Attachment object to PDF. For that i created a trigger(before insert) on Attachment object and used the below mentioned code,...
2
votes
2answers
841 views

AMPScript/GTL function to check if variable is string or a numeric

Need to check a type of variable in ampscript, in order to use FormatNumber function(that can only work with integer variables). I tried the Handlebars function {{isString()}}, but can't make it ...
2
votes
1answer
5k views

Escaping single quote character breaks String.format(stringToFormat, formattingArguments) [duplicate]

When I run this code: String.format('Dear {0}, Don\'t forget .... {1} .... {2}', args); Token 0 is replaced, but token 1 and 2 appear as {1} and {2} This is caused by the backslash escaping the ...