• Anurag Dandamudi
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I have the below requirement

When an Email is logged to a custom object (specific) and if the email has any attachments, take the attachments and upload them to a box folder.

Currently i am using the contentdocumentlink trigger (wasn't able to get anthing triggered at EmailMessage level) to send the attachments to box using box for salesforce sdk.

Is there any better way to write the trigger at the Email level rather than the contentdocument level?

Also the box for salesforce sdk can only upload a file with max filesize of 4.3MB, is there any workaround to upload the attachment upto 25MB?
I have the below requirement

When an Email is logged to a custom object (specific) and if the email has any attachments, take the attachments and upload them to a box folder.

Currently i am using the contentdocumentlink trigger (wasn't able to get anthing triggered at EmailMessage level) to send the attachments to box using box for salesforce sdk.

Is there any better way to write the trigger at the Email level rather than the contentdocument level?

Also the box for salesforce sdk can only upload a file with max filesize of 4.3MB, is there any workaround to upload the attachment upto 25MB?
Hi !

I'am trying to make a callout to a remote site api. This api is called with the url https://api.insee.fr/entreprises/sirene/V3/siren and the method GET.

I played with this api using RESTer and POSTMAN and it's worked fine. When I implemented it with APEX, the call systematically returns 405 Method Not Allowed.  I'm using the right URL and method but it keeps this answer. The site is allowed as a remote site.

Here is some APEX :
 
public static HTTPResponse HttpCall(String endpoint, String protocol, Map<String, String> mapHeaders, String strBody, Integer timeout)
    {
            HttpRequest req = new HttpRequest();
            req.setEndpoint(endpoint);
            req.setMethod(protocol);

        	if(timeout!= null)
                req.setTimeout(timeout); 
            
            if(mapHeaders != null)
                for(String headerkey : mapHeaders.keyset())
                    req.setHeader(headerkey, mapHeaders.get(headerkey));        
            
            if(strBody != null)
                req.setBody(strBody);
            
            system.debug(req);
            Http http = new Http();
            return http.send(req);
    }

    public static void queryBySiren()
    {        
        system.debug('QUERY BY SIREN:');
		String endpoint = 'https://api.insee.fr/entreprises/sirene/V3/siren';
		String protocol = 'GET';
		Map<String, String> headers = new Map<String, String>();
        String body = '';
        Integer timeout = 50000;
        HTTPResponse resp = SireneRequest.HttpCall(endpoint, protocol, headers, body, timeout);
        
        system.assert('OK' == resp.getStatus(), 'Request error : ' + resp.getstatusCode() + ' ' + resp.getStatus());
    }
Because it's working on RESTer and POSTMAN i'am a litle bit confused.

PS : Instead of returning 405 the api should return 401. Obviously i didn't enter credentials for some reasons ;)
Hello,
I'm new (like beginner) to Salesforce and we are trying to integrate BOX, I need to create and object which must have a file upload field and save that into BOX, please someone help me the procedure? I googled but no use (since I'm a new I have no clue where to find)
Appreciate your help..