Skip to main content Join the Agentforce Virtual Hackathon to build innovative solutions and compete for a $50k Grand Prize. Sign up now. Terms apply.

#Developers0 discussing

I'm currently facing an issue with displaying a Lightning Web Component (LWC) quick action button on the Task record page.

Here are the details of what I've done:

 

1. LWC Quick Action Creation:

  • I have created a Lightning Web Component for a quick action under the Task object.
  • I updated the XML as shown below:

<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

    <apiVersion>57.0</apiVersion>

    <isExposed>true</isExposed>

    <targets>

        <target>lightning__RecordAction</target>

    </targets>

    <targetConfigs>

        <targetConfig targets="lightning__RecordAction">

            <actionType>ScreenAction</actionType>

        </targetConfig>

    </targetConfigs>

</LightningComponentBundle>

 

2. Page Layout Configuration:

  1. I have added the button to the page layout under "Salesforce Mobile and Lightning Experience Actions."

Despite following these steps, the quick action button is not visible on the Task record page. I have ensured that the action is available in the "Lightning and Mobile Actions" section of the page layout.

Can anyone help me identify what might be causing this issue or suggest any additional steps to troubleshoot? Your assistance is highly appreciated.

Thank you in advance!

 

#Developers #Lightning Web Components #Quick Actions #Pagelayouts

4 answers
  1. Nov 28, 2024, 6:00 PM

    I had a similar problem, and found a solution for my case:

    In Service Setup > Channels > Digital Experiences > Settings, make sure the "Use Lightning web components on your record pages in Aura sites" option under "Experience Management Settings" is checked.

0/9000
3 answers
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    Nov 30, 2023, 5:58 PM

    @Saurabh Kashyap, I suppose you could ease the overall architecture to only query once, and to get quantity (not available will be understandable when quantity = 0). Indeed you have to queue the calls (queuable apex). You should handle the error code in each call as you normally do testing the getStatusCode from the http send request's response.

     

    PS : A detail, I suppose you could be able to trigger on product required (instead of product consumed) but that does not change the logic of the integration :)

    Eric

0/9000
4 answers
  1. Nov 17, 2023, 10:47 AM

    Hi @Saurabh Kashyap

    Check the example below which worked for me. 

    I wanted to create button under Opportunity related list. 

    Hi Check the example below which worked for me. I wanted to create button under Opportunity related list.

     

    A2.jpg

0/9000

Hi guys, 

 

I'm working on my form Layout and I recently added a javascript to show the phone country code on my phone field on forms. 

 

The problem is that even if the phone number is a required field, the phone code value (ex for France +33) is enough to bypass the field completion. 

 

I'd like to add a min and max caracter number to avoid this. Is it possible through css? 

 

I don't have access to the main script (which is here: https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.15/js/utils.min.js) and I don't want to mess with it by adding another script in my layout. 

 

Best, 

 

Hugo

 

#Data Management #Sales Cloud #Salesforce Developer #Developers

2 answers
  1. Nov 16, 2023, 7:56 AM

    Hi @Mikey Brown, thanks for the answer, the only HTML part I have access to is on the "Form" tab of the layout. It goes like this:

     

    <form accept-charset="UTF-8" method="post" action="%%form-action-url%%" class="form" id="pardot-form">

    %%form-opening-general-content%%

    %%form-if-thank-you%%

    %%form-javascript-focus%%

    %%form-thank-you-content%%

    %%form-thank-you-code%%

    %%form-end-if-thank-you%%

    %%form-if-display-form%%

    %%form-before-form-content%%

    %%form-if-error%%

    <p class="errors">Please correct the errors below:</p>

    %%form-end-if-error%%

    %%form-start-loop-fields%%

    <div class="form-field %%form-field-css-classes%% %%form-field-class-type%% %%form-field-class-required%% %%form-field-class-hidden%% %%form-field-class-no-label%% %%form-field-class-error%% %%form-field-dependency-css%%">

    %%form-if-field-label%%

    <label class="field-label" for="%%form-field-id%%">%%form-field-label%%</label>

    %%form-end-if-field-label%%

    %%form-field-input%%

    %%form-if-field-description%%

    <span class="description">%%form-field-description%%</span>

    %%form-end-if-field-description%%

    <div id="error_for_%%form-field-id%%" style="display:none"></div>

    %%form-field-if-error%%

    <p class="error no-label">%%form-field-error-message%%</p>

    %%form-field-end-if-error%%

        </div>

    %%form-end-loop-fields%%

    %%form-spam-trap-field%%

    <!-- forces IE5-8 to correctly submit UTF8 content  -->

    <input name="_utf8" type="hidden" value="☃" />

    <div class="submit">

    <input type="submit" accesskey="s" value="%%form-submit-button-text%%" %%form-submit-disabled%%/>

    </div>

    %%form-after-form-content%%

    %%form-end-if-display-form%%

    %%form-javascript-link-target-top%%

    </form>

     

    Unfortunately, the code you gave me does not match the info I get when I inspect my form (screen attached) - especially the name and ID that change depending on the form. Any idea how to solves this? 

0/9000

I am trying to make an HTTP call-out from a flow (triggered when an address is entered on an Account a certain fields are filled in) to Google maps API. 

 

We have it set up to only require an API key. No named credentials are needed for the set up.

When the API is set up without restrictions, it works fine. However, if the 

client wishes to restrict the API to certain URLs. 

 

When we try to restrict the API to different variations on 

client.my.salesforce.com

 with or without https:// and/or an asterisk as a wildcard at the end or towards the front.

 

Does anyone know the url the API request would be coming from?

 

Thanks

#Flow #HTTPCalloutFramework #Httpcallout #Developers #Salesforce Developers

3 answers
  1. Jonathan Fox (Intellect AI, Intellect Design Arena) Forum Ambassador
    Oct 16, 2023, 5:49 AM
    Without testing (I'm answering on mobile) I don't know but you could make a callout from the flow to something such as a webhook bin site or a mock Postman server - that'll tell you where I came from
0/9000

Exciting news! I just published a new blog post on enabling Einstein for Salesforce developers. Unlock the power of AI in your CRM with this step-by-step tutorial. Check it out here:

 

YouTube: https://lnkd.in/gZMp4GVX

 

Blog: https://lnkd.in/gdtR3wtY

 

#Salesforce #Einstein #AI #Developers #CRM #HSCodeHub

0/9000

We need your feedback to improve your developer experience! Take our survey so we can understand how to help make you more successful when developing and building with Salesforce. Thank you! 

 

What did you tell us in previous developer surveys? Check out this blog post written by @Jerry Thomas of Salesforce Developer Marketing. 

Have you taken the Salesforce Developer Survey yet?

#Certifications

1 answer
0/9000

Hello everyone, I just got my first Salesforce certificate (B2C Commerce Developer), and now I wanted to start studying for the B2C Commerce Architect exam (https://trailhead.salesforce.com/en/credentials/b2ccommercearchitect). On the exam guide they are suggesting me to study on the SFCC documentation (apart from the Trialhead academy courses), and I wanted to ask which are the areas of the documentation I should focus on?

 

Example: for the developer exam it was easy since I just needed to focus on the Developer and Merchandising part mostly.

 

#Developers #B2C Commerce #B2C Solution Architects #B2C Commerce Developer #B2C Developer Certification

5 answers
  1. Ines Garcia (get: Agile) Forum Ambassador
    Jun 22, 2022, 11:02 AM

    You have quite a few here in the modules in trailhead, just filter by commerce as product

    also wrote this some time back: https://salesforceweek.ly/2022/03/three-and-a-half-b2c-commerce-sfcc-things-weve-learned-this-week.html

0/9000

I am writing Test class and facing below issue in Test class. #Developers #Salesforce Developer

1st:Wrote test class for Batch Class and its not covering Execute method in test class even I tried to give correct query. I have tried to use execute method too but its not helping.

global class orderStatusUpdateBatch implements Database.Batchable<SObject> {     public String soqlquery;    global Database.QueryLocator start(Database.BatchableContext BC) {       String ChkStatus='Completing Order';      Datetime dt = System.now();      dt = dt.addMinutes(-5);      List<Order> OrderLists=[SELECT Id,Status FROM Order where Status=:ChkStatus AND LastModifiedDate<=: dt];      soqlquery = 'SELECT Id,Status FROM Order where Status=:ChkStatus AND LastModifiedDate<=: dt';         return database.getquerylocator(soqlquery);                 }        global void execute(Database.BatchableContext BC, List<Order> OrderLists) {          List<Order> UpdateOrderList = New List<Order>();         for(Order Ord:OrderLists)         {           Ord.Status='Draft';           UpdateOrderList.add(Ord);         }         update UpdateOrderList;         System.debug('UpdateOrderList' + UpdateOrderList + ' OrderLists:' + OrderLists);       }       global void finish(Database.BatchableContext BC) {          System.debug('BatchApexClassExample Batch job completed successfully.');       } }

 

--------------------------------------------------------------------

@istest public class orderStatusUpdateBatchTest {     static testmethod void OrderTestMethod()     {         Account testAccount = new Account(Name='TestAccount');         insert testAccount;         Account account = [SELECT Id FROM Account WHERE Name='TestAccount' LIMIT 1];                  Order Ord = new Order(AccountId=account.Id,EffectiveDate=Date.valueOf('2022-04-02'),status='Completing Order',Pricebook2Id=Test.getStandardPricebookId());         insert Ord;         Test.StartTest();         String ChkStatus='Completing Order';         Datetime dt = System.now();         //dt = dt.addMinutes(-5);         orderStatusUpdateBatch orderbatch = new orderStatusUpdateBatch ();         orderbatch.soqlquery='SELECT Id,Status FROM Order where Status=:ChkStatus AND LastModifiedDate<=: dt';         ID batchprocessid = Database.executeBatch(orderbatch);         //Database.executebatch(orderbatch);         //orderbatch.execute(null,Ord);         /*Database.BatchableContext BC = new Database.BatchableContext();         orderStatusUpdateBatch.execute(BC, Ord);*/         Test.StopTest();         //System.assertEquals(1, [select count() from order where Status = 'Completing Order']);         //Order Ord1 = [select Status from order where id=:Ord.Id];          //System.AssertEquals(database.countquery('SELECT COUNT() FROM Order '),200);    }      }

0/9000

Excited to share that I have completed my 131 Trailhead badges. It's feels awesome being a 

 

Road To Ranger

#Ranger #RoadToRanger #TrailheadQuest #Developers @Trailhead

6 answers
  1. May 9, 2022, 9:23 PM

    HI

    Could u pls tell me ,,How long did you take for completing these badges

0/9000