• Arpit Patel 8
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

 Hi,

I'm trying to call the Analytics REST API in my Apex code. I'm getting an Read Time Out exception. Can someone look at it and let me know what can be the issue.

The code snippet and debug log is given below:

   HttpRequest req = new HttpRequest();
  //Set HTTPRequest header properties
  req.setMethod('GET');


  req.setHeader('content-type', 'application/json.');
  req.setHeader('Content-Length','1024');
  req.setEndpoint( URL.getSalesforceBaseUrl().toExternalForm() + '/services/data/v29.0/analytics/reports/00OQ0000000epc5');
  req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());

  Http http = new Http();
 
   try {
 
        //Execute web service call here    
        HTTPResponse res = http.send(req); 


       
} catch(System.CalloutException e) {
   
}  

Debug Log:

   
21:27:35.060 (60501282)|CALLOUT_REQUEST|[28]|System.HttpRequest[Endpoint=https://test.salesforce.com/services/data/v29.0/analytics/reports/00OQ0000000epc5, Method=GET]
21:27:45.079 (10079369700)|EXCEPTION_THROWN|[28]|System.CalloutException: Read timed out

 


I wanted to upload a free app on appexchange. I initated the security review of my app and Salesforce found some issues with the App. I fixed some of the issues, however there is one issue in particular that I'm not sure that how would I fix it.. The issue is given below

"Issue – CRUD and FLS Enforcement"

In my app, I have created 3 custom objects. How do I set CRUD for these objects in my managed package? Would appeciate any help r feedback, as I want to close the review ASAP.

Thank you.

Hi,

Is it possible to update a child record of all contacts when one of the contact child record is updated? We have a custom object associated to contacts and would like the same record to reflect on all contacts within the same account. For example, Account A has 2 contacts, Contact 1 and Contact 2. Each contact has a child record, namely Child Record 1.a and Child Record 2.a. When Child Record 1.a is updated, Child Record 2.a should also update. Both child records should have the same info.

Is this possible? How do I do this?

Thanks!
I have written a trigger on event for contact object. If I try to create an event for Merchandise object, the below trigger is getting fired and throws an error.

How I can restrict the below trigger to work only for events created on contact object.

trigger ContactSysIDEvent on Event (before insert) {
    ID evid;
   for (event e:trigger.new)
    { evid=e.whoid;
    contact m123 =[select name,id_type__C,sys_id__c,siebel_id__C from contact
                          where id=:evid];
    if(m123.id_type__C=='Sys ID')
        { e.Contact_sys_ID__c=m123.sys_id__c; }
        else{ e.contact_sys_id__C=m123.siebel_id__C; }
}
}
I wanted to upload a free app on appexchange. I initated the security review of my app and Salesforce found some issues with the App. I fixed some of the issues, however there is one issue in particular that I'm not sure that how would I fix it.. The issue is given below

"Issue – CRUD and FLS Enforcement"

In my app, I have created 3 custom objects. How do I set CRUD for these objects in my managed package? Would appeciate any help r feedback, as I want to close the review ASAP.

Thank you.