• Guntin Guntin L Garcia
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 3
    Replies
I'm looking for a way to create a report with the average of cases created by users every month. With the particular that the number of days of the month will be only the days where the case has been created.

For example:
A user has created 10 cases on July 1 and another 20 on July 5. So, have been created 30 cases in just 2 days. The average in July is (30 cases / 2 days) 15 daily avg.
Hi,

I'd like to know if we're close to the governor limits REST.

Thanks,
Pedro
Hi...

I've started a job to develop and maintain many apps developed for someone else; the documentation is poor.

What is the best way to create good documentation from existing apps?
Is there a way to know all dependencies and processes which affect a field or object?
For example, a custom client field was updated by a trigger launched by Case. So, I expended a lot of hours to get it.

Thanks,
Pedro
 
Requirement:
Renderer files (image or pdf) in an LWC component.
I have access to Dropbox API, I need to download a file and show it in an LWC.
I'm using the fetch function to retrieve the file but I don't know how to render it in an LWC component.

I appreciate any help.

Thanks


 
Hi...

I've created a flow in a Sandbox with Winter'21. I could not deploy it to production. I got the following error:
 Property 'filterLogic' not valid in version 49.0
I've developed a code to upload a file to dropbox since LWC. It doesn't work.

The File Upload LWC component returned a ContentDocumentId once the file is uploaded. 
The Dropbox API to upload a file requires the file location to send it to the Dropbox folder. I've tried to send in the body the file content, taken from ContentVersion.VersionData but it doesn't work. A file in Dropbox is created with unreadable content.
How could I solve it?
Here is my code 
@AuraEnabled
    public static String uploadFile(Id documentId, Id recordId, String path){

        path = createFolder(recordId);

        Metadata fileMetadata;

        ContentVersion file = [Select Id, Title, contentdocumentid, FileExtension, VersionData, PathOnClient from ContentVersion where islatest = true and contentdocumentid =: documentId LIMIT 1 ];

        GUIJE_OAuthController.OAuth oAuthInstance = GUIJE_OAuthController.getOAuthByName(PROVIDER_NAME);

        HttpRequest request = new HttpRequest();

        if(!String.isBlank(oAuthInstance.access_token)){

            request.setHeader('Authorization', String.format('Bearer {0}', new List<String>{oAuthInstance.access_token}));
        }
        else {
            //@todo reset token;
        }

        
        request.setMethod('POST');
        request.setTimeout(60000);
        request.setEndpoint('https://content.dropboxapi.com/2/files/upload');

        UploadFile upfile = new UploadFile(path+'/'+file.Title+'.'+file.FileExtension);


        request.setHeader('Dropbox-API-Arg', JSON.serialize(upfile));
        request.setHeader('Content-Type', 'application/octet-stream');
        

        String attachmentBody = EncodingUtil.base64Encode(file.VersionData);

        request.setBody(attachmentBody);



        request.setBody(EncodingUtil.base64Encode(file.VersionData));

        HttpResponse response = GUIJE_REST.send(request);

        if (response.getStatusCode() == 201 || response.getStatusCode() == 200) {
               

            fileMetadata = (Metadata) JSON.deserialize(response.getBody(), Metadata.class);

            
        }
        else {

            System.debug(response.getStatus());
            fileMetadata = new Metadata();
            fileMetadata.error = JSON.serialize(response.getStatus());
        }

        return JSON.serialize(fileMetadata);

    }

Thanks
Hi...

How could I deprecate an object field in my next version of an unmanaged package?

If the field is not included in the next unmanaged package, It launches an error in the installation process.

Thanks,
Hi,

I'd like to know if we're close to the governor limits REST.

Thanks,
Pedro
Requirement:
Renderer files (image or pdf) in an LWC component.
I have access to Dropbox API, I need to download a file and show it in an LWC.
I'm using the fetch function to retrieve the file but I don't know how to render it in an LWC component.

I appreciate any help.

Thanks


 
Hi...

I've created a flow in a Sandbox with Winter'21. I could not deploy it to production. I got the following error:
 Property 'filterLogic' not valid in version 49.0