In sandbox, I am attempting to gather the information from https://data.nasdaq.com/api/v3/datasets/USTREASURY/YIELD.json
I used the beta feature of creating an HTTP callout right from the flow. It creates an external service based on the sample response you provide.
My problem is that within the JSON created, there is an array within an array; because the response is like
"data":[["2023-02-02","4.62","4.65","4.66","4.76","4.64","4.09","3.75","3.49","3.44","3.4","3.67","3.55"]],
When I access the response from the callout within the flow, the array column_names is available, but not the array data.
The JSON created is:
{"openapi":"3.0.1",
"info":{"title":"dataNasdaqGetRates"
,"description":""},
"paths":{"":{"get":{"description":"",
"operationId":"getRates",
"parameters":[{"name":"api_key","in":"query","required":true,"allowEmptyValue":false,
"schema":{"type":"string"}},
{"name":"order","in":"query","required":true,"allowEmptyValue":false,
"schema":{"type":"string"}},
{"name":"limit","in":"query","required":true,"allowEmptyValue":false,
"schema":{"type":"integer","format":"int32"}}],
"responses":{"2XX":{"description":"",
"content":{"application/json":{"schema":{"type":"object",
"properties":{"dataset":{"type":"object",
"properties":{"end_date":{"type":"string"},
"data":{"type":"array",
"items":{"type":"array",
"items":{"type":"string"}}},
"description":{"type":"string"},
"newest_available_date":{"type":"string"},
"type":{"type":"string"},
"dataset_code":{"type":"string"},
"column_index":{"type":"string"},
"frequency":{"type":"string"},
"oldest_available_date":{"type":"string"},
"transform":{"type":"string"},
"premium":{"type":"boolean"},
"refreshed_at":{"type":"string"},
"database_id":{"type":"integer",
"format":"int64"},
"database_code":{"type":"string"},
"name":{"type":"string"},
"limit":{"type":"integer","format":"int64"},
"id":{"type":"integer","format":"int64"},
"column_names":{"type":"array",
"items":{"type":"string"}},
"collapse":{"type":"string"},
"start_date":{"type":"string"},
"order":{"type":"string"}
}}}}}}}}}}}}
I've attempted to tweak the JSON to remove the nested array, hoping it might just work. I've attempted to add additional "type": to the nested array (technically the first item is a string and the rest are integers).
I was expecting there to be another apex-defined list called "data" listed after columnx5fnames; or even just a text collection or anything at all that I could add to a variable and access.
response items menu from flow
Does IronPDF support html query parameters, or is there an alternate method?
I've been using IronPDF to convert an html file to PDF using the following method: var pdf = ironRenderer.RenderUrlAsPdf(reportPath);
However, the html located at reportPath now requires a parameter userid. I have tried var pdf = ironRenderer.RenderUrlAsPdf(reportPath?userid=1); but that gives me the following error: CheckHtmlFilePath - File not found: .../index.html%3Fuserid=1'
I can't see any documentation in IronPdf that parameters are supported. Does anyone have any work arounds?
Instead of adding the parameter to the variable name, add it to the string. For example:
reportPath += "?userid=1";
var pdf = ironRenderer.RenderUrlAsPdf(reportPath);
Check the URL to see if there is already a parameter, and manipulate the URL string accordingly. If you posted more code I could have described more.
Am trying to convert JSON data to list but its showing null. my code and JSON data like below.But in the list (lst) it showing null.
JSON:
{"Data":[{"LocationId":6,"LocationName":"abc","ServiceUrl":"www.google.com", },{"LocationId":3,"LocationName":"abcd","ServiceUrl":"192.168.0.110/IKLT/service.svc"}],"ErrorCode":"201 - Success","Message":"Success","Status":true}
Code:
GetLocationResult lst= JsonConvert.DeserializeObject<GetLocationResult>(result);
GetLocationResult lr = (GetLocationResult)JsonConvert.DeserializeObject(result, typeof(GetLocationResult));
GetLocationResult is a class for above JSON
I inspected your json string, the syntax is wrong. Remove the extra comma shown in the picture below:
I have a requirement where I want to merge two pdfs in to a single pdf and attach in the attachements to the custom object in salesforce then this merged pdf is sent via email.
Here is my code snippet. Where contentPdf is one pdf and b is another pdf content which needs to be merged.
PageReference pdf = PageReference(/apex/FirstPDF?id='+ccId);
Blob contentPdf = pdf.getContent();
PageReference cadre = new PageReference('/apex/SecondPDF?id=' + ccId);
Blob b = cadre.getContentPdf();
String combinedPdf = EncodingUtil.convertToHex(contentPdf)+EncodingUtil.convertToHex(b);
Blob horodatagePdf = EncodingUtil.convertFromHex(combinedPdf);
Attachment attachment = new Attachment();
attachment.Body = horodatagePdf;
attachment.Name = String.valueOf('New pdf.pdf');
attachment.ParentId = ccId;
insert attachment;
But the problem is that it does not show the right documents merged instead it shows only one page in the final pdf saved in my machine. I have tried to use contentAsPdf() to retrieve content from pageReference but it does not work. Moreover the page is not well generated the one I get in the attachment. Or if there is any other way to do it quuickely.
I don't think you can merge PDF documents like that. It looks crazy. You can simply join text files together but anything more complex (JPEGs, PDFs...) has special structure... It's quite possible that your code works, in the sense that it generates a file which size is a sum of single files' sizes but it's not a valid document so only 1st part renders OK.
Try making another page which would just reuse the other 2 pages by calling them (use <apex:include>). Check if it renders close to what you're after (there might be style clashes for example) and if it's any good - call getContentAsPdf() on that?
Hi i have a code which select the particular select attribute value of a product
<?php $attribute_value = $_product->getAttributeText('highligted_features');
print_r($attribute_value);
?>
when i am using this in view file it works properly
but when i place this code in a different file and call that file in
static block
and
than when i call that block in file it gives 500 internal server error
.
when i
Check attribute is not available in used in Product list attribute setting .Thus you cannot getting in other pages,If you using catalog product flat then flat table is not include highligted_features attribute in it columns