• Prathap I am :)
  • NEWBIE
  • 15 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 8
    Replies
Hi guys ,
I need help on JSON parsing
Please find the following JSON Snippet and please try to solve it

Work__c is an object in my org & it is having employee_name__c ,position_name__c ,location_name__c , start_date__c,end_date__c fields
so i need to create multiple work history records from json data

"work": [
      {
         "employer": {
            "id": "184345499708",
            "name": "KVP Business Solutions"
         },
         "location": {
            "id": "106377336067638",
            "name": "Bangalore, India"
         },
         "position": {
            "id": "112569935464410",
            "name": "Salesforce Developer"
         },
         "start_date": "2013-12-31"
      },
      {
         "employer": {
            "id": "150588161629708",
            "name": "GSS Infotech"
         },
         "location": {
            "id": "115200305158163",
            "name": "Hyderabad, Andhra Pradesh"
         },
         "position": {
            "id": "112569935464410",
            "name": "Salesforce Developer"
         },
         "start_date": "2011-07-01",
         "end_date": "2013-11-29"
      }
   ]
Hi 

can we get PDF files in documents object using REST API ??

Plese see following snippet . it is retriving the blank pdf template . pls help me in this 

public void Attachementinfo(){
       
        //Set the Rest Class End Point URL
        String url = 'https://ap1.salesforce.com/services/data/v29.0/sobjects/Document/01590000002nNOL/body';
       
        Http h = new Http();
        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');
        String authorizationHeader = 'OAuth ' +SessionId;
        req.setHeader('Authorization',authorizationHeader);
        HttpResponse res = h.send(req);
        if(res.getStatusCode()==200){
       
       
        Document d=new Document();
        d.body=blob.valueOf(res.getBody());
        d.description='Hello Welcome to Documents';
        d.Keywords='marketing,sales,update';
        d.FolderId='00li0000001jDVB';
        d.Name='Marketing Brochure Q1';
        d.Type='pdf';
        insert d;
        Attachmentbody='Document has been created with id : '+d.id;
        }
        else
        Attachmentbody='Attachment is Failed';
    }
Hi,

Can we able to send visualforce PDF from salesforce using REST API ???
Hi,
I need to send PDF from salesforce to saleforce using REST API .

Can anybody help me out ??

Thanks in advance.
Hi All,
I have a visualforce page , Its rerendering when i change a picklist value
What i need is --->  the same picklist should be focused after rerendering the visulaforce page

Can anybody solve this ???

thanks in advance .

Prathap

Hi All ,

Let me explain my issue here ,

 

I have 2 objects lets say Account , contact .

 

I have to create a list button for "Contact" related list on account object , so when i select some records and hit "List Button" it should navigate me to new page where it should consist the information of selected records one after another . if  i modify any record field values and hit "save" button , it should save the records & navigate me to Parent Account record with contact related list updated

 

Thanks in advance if you trying to help me

 

Prathap

Hi 

can we get PDF files in documents object using REST API ??

Plese see following snippet . it is retriving the blank pdf template . pls help me in this 

public void Attachementinfo(){
       
        //Set the Rest Class End Point URL
        String url = 'https://ap1.salesforce.com/services/data/v29.0/sobjects/Document/01590000002nNOL/body';
       
        Http h = new Http();
        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');
        String authorizationHeader = 'OAuth ' +SessionId;
        req.setHeader('Authorization',authorizationHeader);
        HttpResponse res = h.send(req);
        if(res.getStatusCode()==200){
       
       
        Document d=new Document();
        d.body=blob.valueOf(res.getBody());
        d.description='Hello Welcome to Documents';
        d.Keywords='marketing,sales,update';
        d.FolderId='00li0000001jDVB';
        d.Name='Marketing Brochure Q1';
        d.Type='pdf';
        insert d;
        Attachmentbody='Document has been created with id : '+d.id;
        }
        else
        Attachmentbody='Attachment is Failed';
    }
Hi,
I need to send PDF from salesforce to saleforce using REST API .

Can anybody help me out ??

Thanks in advance.
Receiving this error when editing a visualforce page in sandbox through developer console or third party IDE.  This page has been working in production for some time. Both page and controller are set to version 32 in sandbox and production. 
The page can be edited directly through Develop->Pages.

Here's a very simplified version of the page which produces the error
 
<apex:page standardController="User" extensions="SalesRepGoalController2"> 

<b>Hello World!</b>
</apex:page>
and controller
 
public with sharing class SalesRepGoalController2{
private String userID = '' ; 	
public SalesRepGoalController2(ApexPages.StandardController c)
	{
		userID = c.getId(); 
	}
}

Java 1.7 was installed, but has been uninstalled.

Windows 8 Enterprise,  64bit
IE 10
JRE none

 
  • July 20, 2015
  • Like
  • 1
Hi,

Can we able to send visualforce PDF from salesforce using REST API ???
Hi,
I need to send PDF from salesforce to saleforce using REST API .

Can anybody help me out ??

Thanks in advance.
Hi All,
I have a visualforce page , Its rerendering when i change a picklist value
What i need is --->  the same picklist should be focused after rerendering the visulaforce page

Can anybody solve this ???

thanks in advance .

Prathap

Hi All ,

Let me explain my issue here ,

 

I have 2 objects lets say Account , contact .

 

I have to create a list button for "Contact" related list on account object , so when i select some records and hit "List Button" it should navigate me to new page where it should consist the information of selected records one after another . if  i modify any record field values and hit "save" button , it should save the records & navigate me to Parent Account record with contact related list updated

 

Thanks in advance if you trying to help me

 

Prathap

Hey I was just wondering if anyone out there has managed to get Apex to call any of the functions available in the Facebook API. I know there are all kinds of connectors and such to pull data out of facebook, but I need to publish some stuff using the "Stream.publish" method (here are the docs for it Steam Docs).

I tried to roll my own post request using the @Future(callout=true) but no good, and since it's async I can't see any of the feedback.

 

Here was the request I built.

 

System.debug('Making future call to update Facebook Profile'); //construct an HTTP request HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); req.setEndpoint('http://api.new.facebook.com/restserver.php'); req.setMethod('POST'); req.setBody('method=stream.publish&api_key=[MY KEY WAS HERE]&target_id=1769004737&message=TEST&uid=1769004737'); req.setCompressed(true); // otherwise we hit a limit of 32000 res = http.send(req);

 

If anyone has any idea why that didn't work, or how i can even capture the results of what happened (I don't get any Apex errors, but it doensn't do what it is supposed to either) please let me know. Thanks.