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
SeAlVaSeAlVa 

Make Analytics API display whole fields

Hi there, 
I'm trying to use Analytics API to fetch the results of a report (syncronous) and this report contains a field that might have a JSON inside.

The problem is that the API is returning 

<pre>{
          "value" : "{\n20:{Net:0.0,VAT:0.0,Total:0.0,VAT(%):...",
          "label" : "{\n20:{Net:0.0,VAT:0.0,Total:0.0,VAT(%):..."
        }</pre>

(is cutting out part of the information).

Is there any parameter that I can use or some way to prevent the API from cutting out this information?

Thanks and regards.
Best Answer chosen by SeAlVa
SeAlVaSeAlVa

Salesforce has created a known-issue for this.

https://success.salesforce.com/issues_view?id=a1p30000000T3OG

All Answers

sfdcfoxsfdcfox
Are you certain its the API, and not the console from which you are logging? Have you looked at the request over the wire to make sure? There's no documentation that suggests that the fields are/should be truncated, and surely not as small as the 40 characters being shown (it should reasonably be at least 255 characters if that were the case). How are you generating this output, and what source are you using to generate the request? There's simply not enough information here to help you out.
SeAlVaSeAlVa
Hi,
If I run the report on salesforce, I get the full value
{ 20:{Net:0.0,VAT:0.0,Total:0.0,VAT(%):20.0} }

I've tried to get the value using the REST API (/query?q=SELECT ...) and it also returns the full value.

Regarding Analytics API, I've tried to fetch the API from the developer workbench and from a chrome plugin (Advanced Rest Client Application), and the both of them returned the truncated version of the field.

As I haven't been able to find any documentation regarding this truncation issue and Salesforce default answer to a case is "we no longer provide support to development, ask in the forum before".... here I am.. :P

I'm fetching GET /services/data/v29.0/analytics/reports/00Og0000000FXsJ?includeDetails=true with the authorisation header and the server when needed.

Thanks for your quick answer and sorry if you see this answer coming and going, but as I can't find the edit button, I'm deleting it and replying over and over again each time I need to make a modification.
SeAlVaSeAlVa
This is what Salesforce support answered ¬¬

Hi Sergio,

This is Martin from Salesforce Support on behalf of Jan. Just review your case & it appears that this is an issue with API performance. I apologize for the inconvenience, but I am not trained to handle this kind of concern. I would really love to help you with this however I would like to avoid causing further or more damage to your system.

Issue's like this requires Developer Support which is not covered under your "Basic Support Plan". No worries because we have our developer forum site where you can start a discussion for free Developer Support. Be guided by the steps to get free developer support from the said site.

1. Goto http://www.developerforce.com <http://www.developerforce.com/>  & login using your Salesforce Credentials
2. Click on the Board Tab then more tab
3. Next click on APIs & Integration link
4. Last click on Start a discussion button

I really think that they should try to improve Basic support, at least to be able to recognize bugs when they are reported.
Kel WoodburyKel Woodbury
Did  you ever get an answer on this?

It is very frustrating that it truncates the field at 40 characters instead of going to 255 like the standard reports.
SeAlVaSeAlVa

It has been escalated four days ago to see if is a WAD or a bug. 

(I find incredible that they have a acronym for Works As Designed)

SeAlVaSeAlVa

Salesforce has created a known-issue for this.

https://success.salesforce.com/issues_view?id=a1p30000000T3OG

This was selected as the best answer