Skip to main content

Feed

Connect with fellow Trailblazers. Ask and answer questions to build your skills and network.

i created lightning input field and if I enter 100 then on keyup and keydown values are increases and decreases ,can i disable this OOTB feature   

 

#Salesforce Developer

0/9000

Hi All 

 

I have want to change the background color of my <div> elements based on a value in the bound data as I'm iterating the records from a task. 

 

Basically if the status = Open then background white else grey. I thought this would be using the lwc if / else but that seems to be only true or false and I can't work out how to do this using a getter. 

 

Any ideas would be greatly appreciated. One possibility I thought to use a view model populated at the controller level, and include boolean properties for this. I assume it's probably much simper but I can't find examples. 

 

            <template for:each={taskList} for:item="tsk">                <li class="slds-item" key={tsk.id}>                    <div class="slds-grid  slds-wrap">                        <div class="slds-col slds-size_2-of-3">                            <span style="font-weight:bold">{tsk.Who.Name}</span>                        </div>                        <div class="slds-col slds-size_1-of-3">                            <span style="font-weight:bold">{tsk.CreatedDate}</span>                        </div>                        <div class="slds-size_3-of-3 slds-p-top_small">                            {tsk.Description}                        </div>                    </div>                </li>            </template>

 

 

 

#Salesforce Developer

2 answers
  1. Today, 5:25 AM

    Hi , 

     

    You can try the following approach. It is just an example to show how you can change  background color of my <div> elements based on a value from the items you're iterating. 

     

    Suppose your component's name is 'test' . 

     

    /* test.css  */

    .white-background {

      background-color: white;

    }

     

    .grey-background {

      background-color: gray;

    }

     

     

    <!-- test.html -->

    <template>

      <lightning-card>

        <template for:each={taskList} for:item="tsk">

          <li class="slds-item" key={tsk.id}>

            <div

              class="slds-grid slds-wrap slds-p-horizontal_small slds-p-vertical_x-small"

            >

              <div class={tsk.customBackgroundClass}>

                <div class="slds-col slds-size_2-of-3">

                  <span class="slds-text-title_bold">{tsk.Who.Name}</span>

                </div>

                <div class="slds-col slds-size_1-of-3">

                  <lightning-formatted-date-time

                    value={tsk.CreatedDate}

                    year="numeric"

                    month="short"

                    day="2-digit"

                  ></lightning-formatted-date-time>

                </div>

                <div class="slds-size_3-of-3 slds-p-top_small">

                  {tsk.Description}

                </div>

              </div>

            </div>

          </li>

        </template>

      </lightning-card>

    </template>

     

     

    // test.js

    import { LightningElement } from "lwc";

     

    export default class Test extends LightningElement {

      testCreatedDate = new Date();

     

      taskList = [

        {

          id: 1,

          Who: {

            Name: "John"

          },

          status: "Open",

          CreatedDate: this.testCreatedDate,

          Description: "Test description.",

        },

        {

          id: 2,

          Who: {

            Name: "Jane"

          },

          status: "Close",

          CreatedDate: this.testCreatedDate,

          Description: "Test description."

        }

      ];

     

      connectedCallback() {

        this.taskList=this.taskList.map(item => {

            return {

                ...item,

                customBackgroundClass: item.status === 'Open' ? 'white-background':'grey-background'

            }

        })

      }

    }

0/9000

I'm trying to add some functionalities to this list but it was created from a managed package. Is there a way to get the selected contacts? I want to create an apex class that will get the ids.  

Ways to get checked Ids

 

 

 

#Salesforce Developer  #Apex Class

1 answer
  1. Divya Chauhan (Kcloud Technologies) Forum Ambassador
    Today, 5:14 AM

     Hii @Lily Kim  list view you're referencing is from a managed package, direct customization may be limited. However, there are still some ways you might be able to access selected record IDs

    depending on your use case and the package’s design.  

    1.

    Use Apex with Custom Button (if allowed)

    If the managed package allows you to add a custom button (List View Button) or Action, you can:

    • Create a List Button with Display Checkboxes enabled.
    • Use the {!GETRECORDIDS($ObjectType.Contact)} merge field to get selected IDs.

    2. Lightning Web Component Override (if applicable)

    If the list view is being rendered inside an Experience Site or Lightning App, and you have control over the page layout, you can create an LWC:

    • Add a checkbox column yourself.
    • Track selected items via onchange or onclick.
    • Pass those IDs to Apex for processing.
0/9000

Hello, we are a small business using a Shopify store to sell our products. However, Shopify does not offer robust CRM capabilities, so we are looking for a CRM that can help us manage customer relationships, discover new opportunities, provide customer service, and scale with our growth.

The Salesforce Starter Suite seems like a good option for us, as it provides both Sales and Service Clouds. It also includes Commerce Cloud, which—although we do not plan to use for a storefront—offers relevant objects such as Products, Customers, Collections, Prices, and Orders that align well with our Shopify store’s structure.

I understand that the Starter Suite has some limitations, but these are a bit unclear to me. Specifically, I would like to know:

• Can the Starter Suite be integrated with Shopify?

• Can it sync our customer accounts, products, prices, and orders bidirectionally?

• Is it possible to automatically create leads from abandoned checkout data?

I would appreciate any guidance or resources you can provide on these topics. Thank you!

#Integration #Commerce Cloud #Shopify Integration
2 answers
  1. Today, 5:11 AM

    Hi Divya,

    Thanks for your answer. I am not sure if this is you replying based on your experience or an AI answer. If it is you, Salesforce’s official page shows AppExchange access as off-limits for the Starter Suite, but I am not completely sure if that is correct. Please let me know what is the best tool or app to achieve the functionality I want.

0/9000

How to disable checkbox of a LWC datatable row based on cell value.  

Consider a requirement where all Case records are to be displayed in a LWC data tabe but if the status is closed then the Select checkbox should be disabled so that no further action can be done on that record. @LWC @LWCDatatable

2 answers
  1. Today, 5:10 AM

    Hi, 

     

    The default checkbox column functionality in lightning-datatable can not be disabled for a particular row. You can try custom data type, and also have to make it editable, and  then implement your business logic. 

     

    You can read more about custom data type on: 

    https://developer.salesforce.com/docs/platform/lwc/guide/data-table-custom-types.html

     

     

    resource for making a custom data type editable : 

    https://developer.salesforce.com/docs/platform/lwc/guide/data-table-custom-types-editable.html

0/9000

Has anyone ever had this issue in a scratch org before?? 

 

If I try to save a date field with a new value on the record, it DOES update the new value, and I have enabled field history tracking, so it looks like it knows what the original value was, and also saves the new value. But suddenly, after many days of testing a new flow that's working beautifully...date fields are accepting the newly saved value as if that had been the value all along. Also, in my most recent debug, neither the previous nor new date values were accurate (see screenshot below). 

 

 

Date fields suddenly not triggering flows in my scratch org. Debug shows incorrect values.

 

Before this last run, the debug showed the new date as the old date, so if I changed from April 4th to April 1st, it said it had always been April 1st and therefore no change was being made that would trigger the flow to run. The field is a date field and not a date/time field so the 00:00:00 doesn't bother me. But the dates have been correct so far, so I'm not sure what's going on. This is very new behavior. Anything I can do? 

 

#Flow  #Active Scratch Orgs

0/9000

I'm trying to create a new prompt template but can't find the custom field I added to the new object. I tested it by creating different field types; only the Text (15) field shows. The fields I created using Text (25) or Rich Text don't appear in the prompt.

I’ve confirmed that the fields aren’t set to read-only. Has anyone else run into this or know how to fix it? 

 

#Trailhead Challenges  #Trailhead

1 answer
0/9000

パッケージのICUロケール対応バージョンについて確認させてください。 

 

ICUロケール対応を進めておりまして、 

Salesforce Labs作成の以下のパッケージについて、ICUロケール対応されているかものか確認させてください。 

これらのバージョンのパッケージはICUロケール対応済みのものでしょうか。 

ICUロケール未対応の場合、ICUロケール対応済みのバージョンを教えていただけないでしょうか。 

 

パッケージ               バージョン 

Ideas Anywhere             1.11 

Magic Mover for Notes and Attachments  1.0 

リストビュー用フォローボタン      1.1 

 

よろしくお願いいたします。 

 

#Salesforce Labs

1 answer
  1. Today, 4:57 AM

    @宣晃 中村 さん 

     

    Magic Moverについては以下の投稿でも質問&回答があるのですが、どうも現状では対応していないようですね。英語なので細かいニュアンスは分かりませんが、すぐには対応しそうにない感じがします。 

     

    この中でも述べられていますがApexのバージョンが45.0以下のものがあれば、ICUロケールには対応できていないと判断できそうなので、他のアプリに古いバージョンが含まれているかどうかでも判断できると思います。 

     

    Will the ICU Locale update impact Magic Mover?

0/9000

I know it is always based on use case, but I feel like there should be a general list of flows that almost everyone can use like automating bday and anniversary emails, fixing bad data, automating donor communications, etc.

1 answer
  1. Divya Chauhan (Kcloud Technologies) Forum Ambassador
    Today, 4:52 AM

    Hi @James Lungi yes While it depends on your use case, here’s a solid starter list of flows for any new Nonprofit Cloud (NPC) org:

    1. Birthday & Anniversary Emails
    2. Welcome Emails for New Donors/Volunteers
    3. Thank You Emails After Donations
    4. Recurring Donation Reminders
    5. Data Cleanup (e.g., standardizing phone/email formats)
    6. Inactive Donor Follow-ups
    7. Volunteer Shift Reminders
    8. Address Change Notifications

    These cover common nonprofit needs and are great for building engagement and maintaining clean data.

0/9000

Howdy Trailblazers! I have built an approval process using an orchestration, and all but one of my fields are working. Can you help me understand how to fix the last piece of the puzzle? 

 

Use Case: When a customer requests a refund for a purchased ticket to an event, I want to trigger an approval process. The approver should see a workflow screen on the Attendee record. IF they select "Approve", they should be asked if this will be a partial refund only. IF they select "Yes", they will enter a number representing the amount in USD. This will eventually fill a currency field on the Attendee record. 

 

Right now, all of my variables are being passed the same way (as far as I can tell). On the Attendee record, I can see Refund Approval: Approved and Approver Comments. I cannot see the Approved Partial Refund Amount (currency field). I think that last field is the only part that is not a standard part of the template. I'm wondering if that means I need to build other variables somewhere, but it looks like the Assignment element isn't available in the orchestration, so I'm not really sure how to do this. 

 

First this was a currency field in the screen flow; then I read that currency fields couldn't be passed between flows. I tried text fields with formulas to convert them after being passed to the final flow because ApprovalDecisionComments was a text variable and seemed to be working; then I tried a number field because my understanding is that number variables can be used to populate currency fields. Still not working out. 

 

Adding some screenshots below: 

Orchestration: Approval Process. Custom currency field not populating from number variable?

 

Screenshot 2025-03-23 at 2.08.27 PM.png

 

Screenshot 2025-03-23 at 2.01.40 PM.png

 

Screenshot 2025-03-23 at 2.01.58 PM.png

 

Screenshot 2025-03-23 at 2.02.45 PM.png

 

Screenshot 2025-03-23 at 2.02.57 PM.png

 

Screenshot 2025-03-23 at 2.03.23 PM.png

 

Screenshot 2025-03-23 at 2.04.11 PM.png

 

Screenshot 2025-03-23 at 2.04.35 PM.png

 

Screenshot 2025-03-23 at 2.04.45 PM.png

 

 

 

#Flow

2 answers
  1. Today, 4:51 AM

    @Nitesh Kumar thank you for your time and I'm sorry that I missed your answer. I know I got over this issue a while back now, but from memory, I think the issue was that I had changed the word "Approve" to "Approved" in a flow which began as a template, and had hard-coded elements in the background. When I got rid of the final d, lots of other flow elements started working again.

0/9000