RSS

Diagram as Code

Here are few references for Diagrams as code tools for software architecture

Diagrams – Diagram as Code

Top 7 diagrams as code tools for software architecture

Diagram as Code for prototyping cloud system architectures

Diagrams as Code: The Complete How-to-Use Guide

Diagram as Code – ALEX XU

Happy Learning !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on January 25, 2024 in Uncategorized

 

Eclipse – Name for argument type [java.lang.String] not available, and parameter name information not found in class file either

When i am trying to start the Spring Boot application in the Eclipse IDE, observed the below error

Name for argument type [java.lang.String] not available, and parameter name information not found in class file either

Below is the error stack for reference:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    at org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

Solution :

This is because compiler is not able to store method parameter names while generating the class files. you can enable this compiler option in eclipse IDE by following the below steps:

Go to – Project properties –> Java compiler -> enable / check “Project specific settings” ->
enable/check “Store information about method parameters(usable via reflection)”

Happy Learning !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on January 23, 2024 in Uncategorized

 

Tags: ,

Overview of Salesforce CLI

Here are a few references for the Salesforce CLI Overview

Salesforce CLI Overview

What is the Salesforce CLI? (And How to Use It)

Salesforce CLI Release Notes

salesforce-dx-useful-cli-commands

Conceptual Overview of Salesforce CLI

Uninstall Salesforce CLI or Plugins

Salesforce CLI Plugins

Salesforce CLI Command Reference

Error: Cannot find module ‘@oclif/config’

Happy Learning !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on September 26, 2023 in Uncategorized

 

Essential Tools Java Developers Can Learn in 2023

Here are a few tools Java developers can learn this year. Good to learn new tech stack always.

10 Essential Tools Java Developers Can Learn in 2023

Happy Learning !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on August 17, 2023 in Uncategorized

 

The 8 best flowchart and diagramming tools

Here are a few best flowchart and diagramming tools for reference

The 8 best flowchart and diagramming tools

Happy Learning !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on June 20, 2023 in Uncategorized

 

Apex – Create/Delete file attachments

Hi Friends,

Here is the apex working code to create/delete the file attachments (Content document).

For storing the file attachments, below are the listed objects used.

  1. ContentDocumentLink
  2. ContentDocument
  3. ContentDocumentVersion

Here is the sample code for reference

Step-1: Create a Contentversion record in the Salesforce
final ContentVersion contentVersionRecord = new ContentVersion(Title=’filename’, PathOnClient =’filename.pdf’, VersionData = bodyBlob);
insert contentVersionRecord;

Note: The above code will create a record in Salesforce as ContentDocument and ContentVersion.

Here the ContentDocument is the parent record and ContentVersion is the child record.

Step-2: using the below line of code, will get the content document id
contentVersionRecord = [SELECT Id, Title, ContentDocumentId FROM ContentVersion WHERE Id = :contentVersionRecord .Id LIMIT 1];

Step-2: using the below line of code, will get the content document id
contentVersionRecord = [SELECT Id, Title, ContentDocumentId FROM ContentVersion WHERE Id = :contentVersionRecord .Id LIMIT 1];

Step-3: Next step is to create a ContentDocumentLink record (junction record), which will associate the file to a particular record

final ContentDocumentLink contentLink = new ContentDocumentLink();
contentLink.LinkedEntityId = ‘sObjectId’;
contentLink.contentDocumentId = contentVersionRecord .contentDocumentId;
contentLink.ShareType = ‘I’;
contentLink.Visibility = ‘AllUsers’;
insert contentLink;

Below are the steps to delete the attachment file from the Salesforce

The below code will delete the ContentDocumentLink
delete [SELECT Id from ContentDocumentLink where contentDocument.Title = ‘sample.zip’ and LinkedEntityId = ’00GDR000008UulH2AS’];

The below code will delete the Contentversion
delete [SELECT id from ContentVersion where Title = ‘sample.zip’];

The below code will delete the Content Document
delete [SELECT Id from ContentDocument where Title = ‘sample.zip’];


Note – If we delete the content document then ContentDocumentVersion and ContentDocumentLink will be deleted automatically.

References here:

Salesforce ContentDocumentVersion

Salesforce ContentDocumentLink

ContentDocument and ContentVersion in Salesforce – An Overview

Understanding Salesforce Files (ContentDocument, ContentVersion & ContentDocumentLink))

Does deleting a ContentDocument delete attached ContentDocumentLinks?

Happy Coding !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on April 9, 2023 in Uncategorized

 

Essential Developer Tools to 10X Your Productivity

Hi Friends,

Here are a few useful developer tools, that will help you to speed up your daily workflow/day-to-day activities.

16 Essential Developer Tools to 10X Your Productivityย 

10 Tools and Websites That Make You a More Productive Developer

Best Productivity Apps, Tools & Softwareย 

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on December 6, 2022 in Uncategorized

 

Workbench error : SOAP-ERROR: Encoding: object has no ‘uiRequestId’ property

Today, when I am trying to access the Salesforce workbench with version 55.0, not able to access it.

Getting the below error on the screen

UNKNOWN ERROR: SOAP-ERROR: Encoding: object has no ‘uiRequestId’ property

Workbench Screenshot for reference.

To resolve this issue, I have to change the version from 55.0 to 56.0 while login.

After changing the version from 55.0 to 56.0, able to login into the workbench successfully.

Hope this helps.

Happy Learning !!

Keep watching this space for more updates.

Have a great day ๐Ÿ™‚

 
Leave a comment

Posted by on October 25, 2022 in Uncategorized

 

File Upload using LWC

Hi Friends,

Sharing here the code for uploading file using lwc (Lightning Web Component)

in child .html file code

<div class="slds-form-element__control">
    <div class="slds-file-selector slds-file-selector_files">
        <div class="slds-file-selector__dropzone">
            <input
                type="file"
                class="slds-file-selector__input slds-assistive-text"
                accept=".zip"
                id="file-upload-input-01"
                data-my-id="uploadFile"
                aria-labelledby="file-selector-primary-label file-selector-secondary-label"
                onchange={handleUploadFile}
            />
            <label
                class="slds-file-selector__body"
                for="file-upload-input-01"
                id="file-selector-secondary-label"
            >
                <span class="slds-file-selector__button slds-button slds-button_neutral">
                    Upload File
                </span>
            </label>
        </div>
    </div>
</div>

in child .js file code

handleUploadFile = (event) => {
     event.preventDefault();
     const files = event.target.files;
     const selectedEvent = new CustomEvent('uploadfile', {
         detail: files
     });
     this.dispatchEvent(selectedEvent);
     event.target.value = ''; // reset the target value for calling the click method every time
 };

in parent lwc .html file

onuploadfile={handleFilesChange}

in parent lwc .js file code

async handleFilesChange(event) {
  const files = event.detail;
  if (files.length > 0) {
    const file = {
      fileName : files[0].name,
      fileContent : await this.toBase64(files[0])
    }
    this.uploadedFileName = file.fileName;
    this.filesContent = file.fileContent;
  }
  this.handleGetData();
}

toBase64 = file => new Promise((resolve, reject) => {
  const reader = new FileReader();
  reader.readAsDataURL(file);
  reader.onload = () => {
      let result = reader.result;
      let base64 = 'base64,';
      let content = result.indexOf(base64) + base64.length;
      let fileContents = result.substring(content);
      resolve(fileContents);
  }
    reader.onerror = error => reject(error);
});

handleGetData = () => {
// invoking the rest api logic goes here
}

More Info:

How to upload larger size file using input tag of type html in LWC

File Upload in Lightning Web Component(lwc)

Second use of input file doesn’t trigger onchange anymore

Hope this will helps.

Happy Coding !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on July 10, 2022 in Uncategorized

 

A Salesforce IDE – ASIDE.IO

Hi Friends,

Sharing here a Cloud Salesforce IDE ASIDE.IO

ASIDE.IO is a blazing fast FORCE.COM development IDE in the cloud.

Its a free and full featured Salesforce IDE, up in the cloud environment.

Few of the features are listed here.

CODE EDITOR

Create and edit Apex, Lightning, Visualforce, Static Resources, and Custom Objects.

TEST MONITOR

Execute unit tests in multiple ways, view their results, and obtain code coverage.

DEPLOY MANAGER

Retrieve or deploy by dropping a package.xml or zip from your computer.

QUERY TOOL

Run SOQL queries and view the results in a flexible data grid.

Happy Learning !!

Keep watching this space for more updates.

Have a nice day ๐Ÿ™‚

 
Leave a comment

Posted by on June 29, 2022 in Uncategorized