• Gaurav Srivastava_SDFC
  • NEWBIE
  • 10 Points
  • Member since 2014
  • Sr. Technology Associate
  • Trekbin Technologies Pvt Ltd

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi Folks,

I have created a VF page for Salesforce1 to add OLI. Once OLI is added user is redirected back to Opportunity detail page. But when user tried to view added OLI in the related list section below eror is thrown. Please check te snapshot below.
User-added image

Any solution for it??
After importing all Contacts, it is still showing this error. I have tried many times but stuck with the same error. In other org it is working as expected but I am facing this issue in my org. Do not know what is happening here!
Hi All,
Just got view state issue while "Compile all classes" from the salesforce 'Apex Classes'. Couldn't understand from where VF page is taken into account.

Please check the screenshot below :


User-added image
After importing all Contacts, it is still showing this error. I have tried many times but stuck with the same error. In other org it is working as expected but I am facing this issue in my org. Do not know what is happening here!
Hi All,
Just got view state issue while "Compile all classes" from the salesforce 'Apex Classes'. Couldn't understand from where VF page is taken into account.

Please check the screenshot below :


User-added image
Hello, 

We have a requirement to do a HTTP Post to AEM (Adobe Experience Manager). 

This service at AEM returns back with the message showing number of parameters and key-value information. (Just an echo for testing).

I am facing a wierd challenge where I posting a file to AEM using HTTP Post multipart form data as in the below code but somehow AEM is not able to identify any parameters being sent within the body.

When we test the same AEM service using Postman it works fine. It replies back with number of parameters and keyvalue pairs that exist in the message body.

I constructed the same multipart message in Salesforce and invoked httppost to AEM, I get null value returned. On taking to AEM team, they mention that message is not being constructed correctly.

So started to sending the Multipart messages to thirdparty clients like postbin, requestbin or beeceptor. They all seem to be fine. I compared this with how postman would send. It looks fine. 

In summary:
Postman to AEM - worksfine

Compared  Postman message and Salesforce multipart message using requestbin. looks good.

But Saesforce to AEM - doesnt work.

Has anybody experienced similar issue? anybody has integrated with AEM?
I am suspecting that it has something to do with charactersets, but I dont know what could be wrong. I am not sending any special characters.
Any suggestions?
 
public class ABCService_v2 {
    
    public static void addJobApplication() {        
        
        // Set body
        String boundary = '----------------------------' + String.valueOf(DateTime.now().getTime());
        String body = '--' + boundary + '\r\n';
        body += 'Content-Disposition: form-data; name="buildingId"\r\n\n';
        body += 'id_building\r\n';
        body += '--' + boundary + '\r\n';
        body += 'Content-Disposition: form-data; name="buildingName"\r\n\n';
        body += 'Fashion101\r\n';
        body += '--' + boundary + '\r\n';
        body += 'Content-Disposition: form-data; name="suiteName"\r\n\n';
        body += 'Suite-100\r\n';
        body += '--' + boundary + '--';
 
        // Instantiate a new HTTP request
        HttpRequest req = new HttpRequest();
        
        // Set method and endpoint
        //req.setEndpoint('http://https://requestbin.fullcontact.com/1hlgohv1');
        req.setEndpoint('https://someservicedev-dev.someservice.com/bin/io/floorplan');
        req.setMethod('POST');
        
        
        // Specify the required user name and password to access the endpoint
        // As well as the header and header information
        
        String username = 'jdoe';
        String password = 'jdoe123';
                
        
        // Set headers
        req.setHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);
        req.setHeader('Content-Length', String.valueof(body.length()));
        //req.setHeader('Accept-Charset', 'utf-8, iso-8859-1;q=0.5');
        req.setHeader('Accept-Charset', '*');
        req.setHeader('Accept-Encoding', 'gzip, deflate');
        req.setHeader('Connection', 'close');
        req.setHeader('Accept','*/*');
        Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
        req.setHeader('Authorization', authorizationHeader);
        
        //Set Body
        req.setBody(body);
        
        // Send HTTP request and get HTTP response
        Http http = new Http();
        HttpResponse res = http.send(req);
        system.debug('==============res: ' + res.getBody());
    }
}









 
I am confused as to why a SOQL query against a custom object is only returning the first 150 rows when it should be returning up to the governor limit (50,000). Does anyone have any ideas why my query is being limited?

Here's my controller method:
@RemoteAction
public static List<Metro__c> getAllMetros(){
    String query = 'SELECT Id, Name, state__c FROM Metro__c ORDER BY Name';
    List<Metro__c> r = Database.query(query);
    System.debug('r='+r.size());
    return r;
}
When i look at the debug I see:
10:48:27:237 USER_DEBUG [54]|DEBUG|r=150

There are several thousand records in the Metro__c object. Any insight into this would be appreciated.
 
Hi Folks,

I have created a VF page for Salesforce1 to add OLI. Once OLI is added user is redirected back to Opportunity detail page. But when user tried to view added OLI in the related list section below eror is thrown. Please check te snapshot below.
User-added image

Any solution for it??
After importing all Contacts, it is still showing this error. I have tried many times but stuck with the same error. In other org it is working as expected but I am facing this issue in my org. Do not know what is happening here!
Hi All,
Just got view state issue while "Compile all classes" from the salesforce 'Apex Classes'. Couldn't understand from where VF page is taken into account.

Please check the screenshot below :


User-added image