Skip to main content

#Javascript Code0 人がディスカッション中

Use Third-Party Libraries and Frameworks in Salesforce

 

Do you have existing third-party code that you would like to move to Salesforce? Join this session to learn about the flexibility of the platform in terms of third-party frameworks and libraries.

 

Join me for a session where I'll tell a story about web apps and sharing code inside our awesome community of developers.

This is a theater session at Moscone West, Trailblazer Forest, Delevoper Theather and is scheduled for 14th of September, 9:00 AM - 9:20 AM PST.

Use Third-Party Libraries and Frameworks in Salesforce Do you have existing third-party code that you would like to move to Salesforce?Feel free to connect: LinkedIn

 

Slides (coming soon)

 

Resources:

Use Third-Party JavaScript Libraries

Node Package Manager

Repository with examples

 

#LWC #Component Library #LWC Framework #Salesforce Developer #Javascript Code #Javascript

0/9000

Invitation for Heroku Research

Happy Trailblazer Thursday @Heroku Enthusiasts

 

To help us continue to innovate Heroku, we invite you to join the Heroku Research Program and also our @Salesforce Research Program community ! 

This is an opportunity for customers like yourself to participate in exciting research studies surrounding Heroku and other related products.

By participating in our research program, you have the chance to:

  • Provide input on new features and enhancements
  • Provide input on our Public Product roadmap (Link)
  • Test out products and updates
  • Share your thoughts and ideas with our product team

The program is completely voluntary and requires minimal time commitment. 

 

We’ll ask you to participate in online surveys, webinars, and virtual focus groups — all at your convenience. 

If you are selected, after your participation, you will receive a small gift in appreciation of your time. 

Sign up for the Heroku Research Program here. 

 

Join our Trailblazer Community @Salesforce Research Program to stay on top of upcoming research activities and opportunities !

 

#CommUpdates #CommUpdates#CommUpdates #Heroku #Salesforce Developer #Python #Javascript Code 

0/9000

need to get the id from key field of lwc tableScreenshot 2023-02-17 010208.png

Hi, I'm using html table not standard data table now I want to edit record and for that i need need recordId using onclick in to pass into lightning-record-edit-from so how I will get the id. and If I'm wrong please tell me how I will do it.

Thanks in advance.

#LWC  #Table Component #Javascript Code #Salesforce Developer #Trailblazers #TrailblazerCommunity

1 件の回答
  1. 2023年2月16日 20:23

    Hi @Rashid Minhas,

     

    Modify your html like below

    <tbody>

    <template for:each={Tasks} for:item="task">

    <tr key={task.Id}>

    <td>{task.Name}</td>

    <td>{task.Start_Date__c}</td>

    <td>{task.Due_Date_c}</td>

    <td>{task.Actual_completion_Date_c}</td>

    <td>{task.Status_c}</td>

    <td>{task.Owner.Name}</td>

    <td class="slds-size_1-of-10" data-label="">

    <a onclick={openEditModal} data-id={task.Id}>

    <lightning-icon icon-name="utility:edit" alternative-text="edit" title="Edit" size="xx-small"></lightning-icon>

    </a>

    <a onclick={handleDelete}>

    <lightning-icon icon-name="utility:delete" alternative-text="delete" title="Delete" size="xx-small" class="slds-m-left_x-large"></lightning-icon>

    </a>

    </td>

    </tr>

    </template>

    </tbody>

    As you can see, we have added a data-id attribute to the anchor element that triggers the openEditModal() function. This attribute will store the record ID of the task that needs to be edited.

    you can modify the openEditModal() function to retrieve the record ID from the data-id attribute and pass it to the lightning-record-edit-form component:

    openEditModal(event) {

    var recordId = event.currentTarget.dataset.id;

    var editForm = this.template.querySelector('lightning-record-edit-form');

    editForm.recordId = recordId;

    editForm.submit();

    }

0/9000

JavaScript Certification Study Topic: Understand Hoisting in JavaScript

Understand "Hoisting" in JavaScript is important and at the same time somewhat misleading. In this video, I will cover the Hoisting concept. This is a process that happens while the JavaScript engine interprets the written JavaScript code.

JavaScript engine always interprets the JavaScript code within the Global Execution context which comes with two phases - compilation and execution.

During the compilation phase, JavaScript will parse the written code to find out all functions and variable declarations. When found, it will allocate space in memory for each of the declared variables. This is what knows as "Hoisting".

So "Hoisting" is a process of moving variable and function declarations to the top of the scope. This creates the illusion of "moving at the top of their scope", but in reality, the JavaScript engine will store the declared variables and functions in memory even before the rest of the code try to refer to them.

During the execution phase, the JavaScript engine will assign values to the variables and start processing functions.

Based on the discussion above where I have explained how JavaScript codes are being interpreted, all variable and functions are lifted to the top of their functional/local or global scope regardless of there where they are declared. This is what known as "Hoisting".

 

Blog: https://www.sudipta-deb.in/2021/06/understand-hoisting-in-javascript.html

Video: https://youtu.be/zpR2zT-AlGE

 

Note - I am sharing all my JavaScript Certification study notes below. Please provide your feedback if you see anything wrong or missing. Appreciate your help.

https://www.sudipta-deb.in/p/salesforce-javascript-developer-i-study.html

 

@The Blog Group @Developer Group, Kitchener, CA @Developer Group, Mississauga, CA @* Salesforce Developers * @Developer Group, Dhaka, BD @Admin Group, Mumbai, IN @Admin Group, Chennai, IN @Toronto Administrators Community Group @Admin Group, Jaipur, IN @Admin Group, Dubai, UAE @* Salesforce Administrators * @Admin Group, Bikaner, IN @Certified Javascript Developer I Study G @Platform Champion Alumni @Toronto Salesforce Developer Group @Kolkata User Group @Kolkata User Group, India 

3 件のコメント
  1. 2022年7月30日 11:41

    JavaScript engine always interprets the JavaScript code within the Global Execution context which comes with two phases compilation and execution Visit the provided URL usclinicalresearch.com for further information Visit this link to discover how to write essays and enhance your writing skills You can choose from a variety of essay topics thanks to it as well.

0/9000

Pardot Forms - WCAG Compliance

 

My organization wants to make all of the Pardot forms on our website WCAG compliant. I'm curious if other members of the Trailblazer Community have embarked upon this project before? If so, I'd love to hear about how you were able to make your forms completely compliant with these standards.

 

What types of edits did you make to your Form Layout Template code to achieve this (CSS style sheets and JavaScript)? Was there any specific code you added into your layout templates that allowed screen readers to better read information from the form's HTML? What major hurdles did you come across and could give advice to others on? etc.

1 件のコメント
  1. 2022年4月20日 16:06

    I'd love to see an answer from Pardot/SFDC on this topic.  It would be great if all the WCAG/ADA topics were grouped together also.

0/9000

For example.....Suppose I'm getting this data from my Apex Class

 

objlist=[ 

    {Id: 1, Name:"Jake Peralta", Role: "Employee", Birthday: "01/01/1998"},

    {Id: 2, Name:"Amy Santiago", Role: "Lawyer", Birthday: "11/03/1988"},

    {Id: 3, Name:"Charles Boyle", Role: "Beneficiary", Birthday: "29/12/1993"},

    {Id: 4, Name:"Rosa Diaz", Role: "Spouse", Birthday: "01/06/1968"},

    {Id: 5, Name:"Gina Linetti", Role: "Dependent", Birthday: "23/07/1997"},

    {Id: 6, Name:"Terry Jeffords", Role: "Sibling", Birthday: "21/04/1989"}

    ];

 

I want to sort this w.r.t "Role" field such that the order is:

Spouse

Sibling

Dependent 

Beneficiary

Employee

Lawyer

 

#Javascript  #Javascript Code  #Apex #Salesforce Developer

3 件の回答
  1. 2021年8月23日 13:06

    Hi,  You can try using the Comparable interface to do custom sort on the sObjects List.

     Please refer to below links and try to implement the same.  https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_list_sorting_sobject.htm

     

    https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_comparable.htm

     

    Thanks & Regards

    Mukesh Katoch

0/9000

Hi new javascript learner here, how to solve the proxy issue whenever i log any thing it comes as proxy even though it has some data

 Proxy Data

 

#Javascript Code

2 件の回答
  1. 2021年8月18日 9:50

    Hi, This is an additional layer of security but if you want to log the data for debugging purposes then use JSON.stringify() method

     

    console.log(JSON.stringify(data));

    console.log(JSON.stringify(this.data));

     

    Hope this helps,let me know

0/9000

Blogged - Preparation for JavaScript Certification

Topic: JavaScript Arrays

Objects normally allow to store keyed collection of values, but when it is required to store ordered collection, then JavaScript will come into the picture. JavaScript Array is a special variable, which can hold more than one value (of different types) at a time. This blog post will cover the concepts of Arrays in JavaScript and different ways to manipulate Arrays in JavaScript.

 

Anyone preparing for JavaScript Certification, I hope this post will provide you one place where you will find everything related to JavaScript Arrays starting with how to create JavaScript arrays, how to access individual elements of the array, different methods to manipulate array elements, and finally recent operators like spread and rest which were added as part of ES6.

 

https://bit.ly/3m4ZvUQ

 

@The Blog Group @Developer Group, Kitchener, CA @Developer Group, Mississauga, CA @Developer Group, Dhaka, BD @* Salesforce Developers * @Toronto Administrators Community Group @Admin Group, Mumbai, IN @Admin Group, Chennai, IN @Admin Group, Jaipur, IN @Admin Group, Dubai, UAE @* Salesforce Administrators * @Kolkata User Group @Kolkata User Group, India @Certified Javascript Developer I Study G 

0/9000

Learn how we can Share JavaScript Code in Lightning Web Components. We can create reusable JavaScript Methods using the ES6 export, import module. We can import one JS file module into another JS file.

Share JavaScript Code in Lightning Web Components

1 件のコメント
0/9000

{Blogged} - New to JavaScript development? Thinking about which IDE should you use and how to configure your IDE? How to test JavaScript code? How to debug JavaScript Code?

 

All these are valid and important questions to ask. I am going to create three posts covering each of these above three important points. Today's post is all about answering the first question -

How to configure Visual Studio Code (IDE) for JavaScript Development

1 件のコメント
0/9000