• Sabarinathan N
  • NEWBIE
  • 0 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
Hi All, 
            Im creating force.com site. When i hit the endpoint url for accessing Case in apex class. It is giving xml response. But I need the response in JSON format.


@RestResource(urlMapping='/Cases/*')
global with sharing class CaseManager {

    @HttpGet
    global  static List<case> getCaseById() {
        RestRequest request = RestContext.request;
        RestResponse response = RestContext.response;
        HttpRequest request1 = new HttpRequest();         
        String caseId = request.requestURI.substring(
          request.requestURI.lastIndexOf('/')+1);
        List<Case> result =  [SELECT CaseNumber,Subject,Status,Origin,Priority FROM Case limit 1];     
        return result;

    }

Thanks in Advance
Hey everyone,

I currently set up an integration with VSTS and I have been having issues passing basic HTML to a Salesforce Rich Text field and I was hoping to be pushed in the right direction.

According to this document I believe basic tags like <b>, <u>, and <i> should be able to be passed in but I cannot get it to work for the life of me. Is there anything that should be done?

This is the String value that I am attempting to pass into my Rich Text Field:
'This is a test. <b>BOLD </b><i>Italicized</i><u>Underlined</u> This was a test.'



 
I am trying to find an easy way to locate and remove duplicate accounts.  I haven't located a good way, so was curious if anyone would have any suggestions.
Thank you,
Kiley 
I have to display product image in pageBlockTable:
vf:
<apex:column>
                  <apex:image value="servlet/servlet.FileDownload?file={!p.Image__c}" height="50" width="50"/>
</apex:column>
image is stored in document:
url--https://c.ap6.content.force.com/servlet/servlet.FileDownload?file=0150K000006JMkx 

but image is not displaying in columns properly

 
Hi All, 
            Im creating force.com site. When i hit the endpoint url for accessing Case in apex class. It is giving xml response. But I need the response in JSON format.


@RestResource(urlMapping='/Cases/*')
global with sharing class CaseManager {

    @HttpGet
    global  static List<case> getCaseById() {
        RestRequest request = RestContext.request;
        RestResponse response = RestContext.response;
        HttpRequest request1 = new HttpRequest();         
        String caseId = request.requestURI.substring(
          request.requestURI.lastIndexOf('/')+1);
        List<Case> result =  [SELECT CaseNumber,Subject,Status,Origin,Priority FROM Case limit 1];     
        return result;

    }

Thanks in Advance