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.

Feed

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

Currently in FSL mobile app, when a user uploads multiple pictures (e.g., 5 images) for a single work step, the only way I found is to view them is by navigating to the related Files section and opening each file one by one. However, this process is time-consuming and lacks an easy way to delete a picture if it looks bad or incorrect.

Is there a more efficient way to display all uploaded images for a single record in a unified view.

Does Salesforce offer any Lightning Web Components (LWCs) or standard features to achieve this, or would a custom solution be required? Any suggestions links to samples?

13 answers
  1. Feb 27, 8:02 PM

    @Rimvydas Češkevičius, I've also added delete functionality. Please feel free to adjust it to suit your needs.

    <template>

    <lightning-card title="Image Gallery" icon-name="custom:custom63">

    <template if:true={images}>

    <div class="slds-grid slds-wrap">

    <template for:each={images} for:item="image">

    <div key={image.Id} class="slds-col slds-size_1-of-3 slds-p-around_small">

    <lightning-card>

    <img src={image.Url} alt={image.Title} data-recordid={image.Id} onclick={deleteImage} class="image"/>

    <div class="slds-p-horizontal_small">

    <p>{image.Description}</p>

    </div>

    </lightning-card>

    </div>

    </template>

    </div>

    </template>

    <template if:false={images}>

    <p>No images found.</p>

    </template>

    </lightning-card>

    </template>

     

    import { LightningElement, api, wire } from 'lwc';

    import { ShowToastEvent } from 'lightning/platformShowToastEvent';

    import { refreshApex } from '@salesforce/apex';

    import getImages from '@salesforce/apex/ImageGalleryController.getImages';

    import { deleteRecord } from 'lightning/uiRecordApi';

    export default class ImageGallery extends LightningElement {

    @api recordId = '';

    wiredImagesResult;

    images;

    @wire(getImages, {recordId : '$recordId'})

    wiredImages(result) {

    this.wiredImagesResult = result;

    const { data, error } = result;

    if (data) {

    this.images = data.map(image => ({

    Id: image.contentDocumentId,

    Title: image.title,

    Description: image.description,

    Url: image.versionDataUrl

    }));

    } else if (error) {

    console.error('Error fetching images:', error);

    this.images = null;

    }

    }

    async deleteImage(event) {

    const recordId = event.target.dataset.recordid;

    try {

    await deleteRecord(recordId);

    this.dispatchEvent(

    new ShowToastEvent({title: 'Success', message: 'Image is deleted!', variant: 'success'})

    );

    await refreshApex(this.wiredImagesResult);

    } catch (error) {

    console.error('Error deleting image:', error);

    }

    }

    }

0/9000

I am trying to complete a Superbadge. and seem to be gettinbg a Salesforce Server error--NOT an error in the task itself. 

 

I keep getting the following error when trying to save an Agent Action.  

ui.services.connection.api.ToolingConnectionException: com.sforce.ws.ConnectionException: Exception occurred in direct soap call  

This makes Salesforce go into a downward spiral. I cannot get ANY setup pages to display content after this error.  

 

#Trailhead Superbadges

0/9000

Hi! I'm doing Admin Trailhead and I can't continue in this part because I don't discover where the option Proposal/Price Quote is 

 

 

Thank you :) 

 

 

 

#Trailhead Challenges

1 answer
0/9000
3 answers
  1. Today, 6:48 PM

    @Enrique Sanchez- I usually recommend this when it comes to trailhead playgrounds. They are unstable. And if issues occur which require you to spend more time in fixing playground issues, over doing your actual challenge tasks??? Always create a new environment! 

0/9000

Hi, I get error 

Error element Update_GBP_End_Dates (FlowRecordUpdate). 

The flow tried to update these records: null. This error occurred: UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record or 198 records: 0011U00001... 

 

I think I might know why but wanted to clarify something.  The weird thing is the Flow updates records on a custom object.  The error refers to Account records, which are not related.  In fact, the Accounts I check are not directly related to the records of the custom object.  I am wondering if the issue we are using "Use the IDs and all field values from a record or record collection" when we should be using "Specify conditions to identify records, and set fields individually."  When I debug I see it pulls in lookup fields including Contacts which then might be related to the Accounts. 

 

Do I have the right idea to change how records are updated or am I missing something?  Thanks for any help!  Aron 

 

 

#Flow  #Error Message

3 answers
  1. Today, 6:46 PM

    Yes I agree with you.  

    However what I am not clear about is why did you have the assignment element in the first place? Were you trying to collect all the records to be updated due to a possible Loop there? 

    But ignore it. I might have to see the flow in detail to understand the logic fully.  

     

0/9000

Why can't I disable the Marketing Feature User license for some partner users? When I edit the user and change the cheekbook to disable the license, I save it. It doesn't accept the change. I checked the permission set and they don't have a Marketing Feature User license and they are partner users. 

 

help

 

 

 

#Trailhead Challenges  #Salesforce Developer  #Salesforce Admin  #Marketing Cloud

3 answers
  1. Mar 14, 8:16 PM

     Can you check if there is a validation rule/ trigger/ flow on user which is causing this.

0/9000

I have successfully set up three reservations for Sophia Rodriguez but when I verify to earn 100 points, I get the following error:   

 

Step not yet complete in Data Cloud and Einstein AI

We had an issue checking your challenge. Please refresh the page and try again. 

 

#Trailhead Challenges

0/9000

Is there a quick way to determine what all of the possible values for a field would be when I'm using it in a Report filter?  

 

For example, I want to use a field that is not an ordinary picklist as a filter in a report, but when I choose that field as a filter it does not automatically include all the possible choices for that field. A field such as Salutation or Rating it does show you all of the possible values to choose from, as those are picklists. A different filter such as "Delegated Approver" or "Login Status" don't provide any list of choices so you have to enter the exact words you're filtering for.  

 

 

 

#Reports & Dashboards

1 answer
  1. Today, 6:37 PM

    Only filters on Picklist fields will show you available filter values. Not on text or lookup fields.  

    However for one to view the available values in a particular non-picklist field, what I would do is create a report and add the relevant column to it. 

    Then add a Group report by column grouping, that would show you possible unique values in your concerned field. *unless there are blank/null values in it* 

0/9000
2 answers
0/9000

I have created a flex prompt template and that is giving correct output say 5 book records on preview when i enter a genre from salesforce records.I have configured an agent action with prompt and agent but when I ask the agent the same and give the same input it gives only 2 records as output.Why so? 

 

#Agentforce  #Prompt Builder

0/9000