• ryanschierholz
  • NEWBIE
  • 170 Points
  • Member since 2018
  • Consultant/Admin/Developer
  • TGH


  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 45
    Replies

Hi everyone, 

I'm trying to set up a formula field to return specific text and I'm hoping it's possible to use nested if statements with multiple case functions.

So, if the value in a specific field is one value, use the first case function and, if it's another, use the other case function. 

Here's what I'm trying to use but can't seem to get the syntax to work. 

IF(North_American_Parent_Account__c = TRUE,
CASE(Corresponding_User_Role__c,"Corporate","Corporate (In North America)","Student","Student (In North America)","Educator","Educator (In North America)","Bookstore","Bookstore (In North America)",
IF(North_American_Parent_Account__c = FALSE,
CASE(Corresponding_User_Role__c,"Corporate","Corporate (Outside North America)","Student","Student (Outside North America)","Educator","Educator (Outside North America)","Bookstore","Bookstore (Outside North America)"
,""
))))

Any help would be much appreciated!

I have created a flow for a service appointments and I am trying to create a custom button with the flow in the url. my link for the flow button is below
/flow/Send_SMS_to_Customer?SAPPId={!ServiceAppointment.Id}retURL=/{!ServiceAppointment.Id}

When i click the button I get An unhandled fault has occurred in this flow

User-added image

This is the Get Record element 

User-added image
 
I am trying to build a Lightning Component for a home page that will display three buttons with each one opening up a different link.  

The buttons are all lined up against the border on the left. How do I add padding so that they are all aligned just off of the border?

User-added image

Here is my code:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <lightning:card>
        <aura:set attribute="title">
            <lightning:icon iconName="utility:open_folder" size="small" />
            XYZ Reports
        </aura:set>
  
        <lightning:button label="Download XYZ Report" onclick="{! c.downloadClick}" iconName="utility:download" iconPosition="left" /><br/>
        <br/>
        <lightning:button label="View XYZ Report" onclick="{! c.viewReportClick}" /><br/>
        <br/>
        <lightning:button label="View XYZ Dashboard" onclick="{! c.viewDashClick}" /> <br/>  
        
    </lightning:card>
</aura:component>

 
I have the following component for my Community dispaying specific fields pulled from the user's Account object. How can I style the lightning:outputFields? I have wrapped the lightning:outputFields in a Div wrapper and tried to style that but doesn't work. Any suggestions?
<aura:component controller="AccountDisplayController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    
    <aura:attribute name="accountId" type="string" default = '0010r00000BtdLoAAJ'/>
    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    
    <aura:if isTrue="{! not( empty( v.accountId ) ) }">
        <div class="billingtitle"><h1>Billing Information</h1></div>
        <lightning:recordViewForm recordId="{!v.accountId}" objectApiName="Account">
            
            <div class="slds-grid">
                <div class="slds-col slds-size_1-of-2">
                    <lightning:outputField fieldName="Agreement_Date__c"/>
                    <lightning:outputField fieldName="Renewal_Date__c"/>
                </div>
                <div class="slds-col slds-size_1-of-2">
                    <lightning:outputField fieldName="Product_Service1__c"/>
                    <lightning:outputField fieldName="Number_of_Seats_Purchased__c"/>
                </div>
            </div>
        </lightning:recordViewForm>
    </aura:if>
</aura:component>

 
I have a list of Events, some of them are Related To a custom object (Closing__c). I have Apex and SOQL code to query the Events into a List. I would also like to get the data from a field  (i.e. Summary__c) on the Closing that is related to the Event, so I can display that in a LWC. I can get basic info in SOQL using: 
SELECT Id, Subject, WhoId, WhatId, What.Id, Who.Id, Who.Name, What.Name
          FROM Event
But I would like to access other fields on the Closing__c record. What's the best way to do that? 
 
On our Closing object we have 20+ Date fields for deadlines. I've written a Trigger that will upsert those deadlines to related Events when the date is set or changed, pulling in descriptions from custom meta data type.

However, for each meta data record it loops through all fields on the Closing, which I suspect is not ideal. I suspect there is a way to only include the DATE fields to cycle through, instead of all fields. Is that possible? Here is the code:
 
String objApi = 'pba__Closing__c';
        // 	get Object field map
        Map <String, Schema.SObjectField> fieldMap =  Schema.getGlobalDescribe().get(objApi).getDescribe().fields.getMap();
        
        //	get activity descriptions meta data records for the Object
        List<Activity_Description__mdt> ads = [SELECT Id, Label, Object_API_Name__c, Field_API_Name__c, Description__c, All_Day_Event__c 
                                               FROM Activity_Description__mdt
                                               WHERE Object_API_Name__c =: objApi];
        
        // for each record in the batch
        for(pba__Closing__c cl : newClosing){
            // for each Activity Description found for the object type
            for(Activity_Description__mdt ad : ads){
                // for each field on the object
                for(Schema.SObjectField sfield : fieldMap.Values()){
                    String fieldApi = sfield.getdescribe().getname();
                    //	if the field api on the Closing matches the field api name on the Activity Description
                    if(fieldApi == ad.Field_API_Name__c) {
                        // DO LOGIC HERE                       
                        
                    }
                }   
            }
        }

 
Our users are required to complete assigned learning. I would like to track the completion date of certain learning items on the User record in custom fields. It's possible with a Process Builder process to have a node for each learning Id and if complete, update the respective field on the User account. However, each time we add one to track, the process would need to be updated and reactivated. I would like to accomplish this through custom metadata and a Flow. The custom metadata has an LearningId field and UserFieldAPI. The Flow would take the completed learning Id and compare with the custom metadata, returning a matching UserFieldAPI (i.e. BasicLearningCompletionDate__c). Then, using a variable, I could update the User record field that matches that field API. And then when we need to make changes, we don't have to update the process or flow, but just add a new metadata record with the LearningId and UserFieldAPI. 

Is this possible in a flow?
The ultimate goal is to be able to iterate over an array in a Lightning web component to show internal reviews about our vendors. There would be at least three levels: Super Category, Category, Review (maybe even four: Super Category, Category, Vendor, Review), so that the root lists are not repeated in the display. For example:

Super Category 1
-Category A
--Review 00
--Review 01
-Category B
--Review 02

Super Category 2
-Category C
--Review 03

Super Category is Parent over Category, which is parent over Review. Review also has references to Super Category. 

ultimately the array might look like this:
superCategories = [
        {
            Name: 'Additions',
            Categories: [
                {
                    Name: 'Bathroom Additions',
                    Reviews: [
                        {
                            Vendor: 'Jay at Pritches Closets',
                            Rating: 5,
                            Comment: 'this is the comment',
                            Phone: '8005551234'
                        }
                    ]
                },
                {
                    Name: 'Kitchen Additions',
                    Reviews: [
                        {
                            Vendor: 'Phil Dunphy',
                            Rating: 4,
                            Comment: 'this is the comment',
                            Phone: '8005551234'
                        }
                    ]
                }
            ]
        }
    ];

What is the best way to accomplish this? In the Controller or the .js of the component? And how?
I am building a list of our preferred vendors and want to show it in a custom lightning web component. I would like all vendors of the same 'Category' to be listed together, with just one header. 
User-added image

As you can see, when there are multiple vendors in one cateogry, the category name/head displays twice. I am sure I could get what I need, through making multiple calls in apex (one for each category), but it seems ideal and more efficient to get all the vendors in one call, and then just adjust their grouping in the lightning web component. 

I query the data in the controller, then display it in the lwc as such: 
<template for:each={vendors.data} for:item="vendor">
                <div key={vendor.Id}>                   
                    <div class="slds-text-heading_small">{vendor.Category_Name__c}</div>
                    <p><lightning-formatted-rich-text value={vendor.Vendor__c} ></lightning-formatted-rich-text></p>
                </div>
            </template>

 
I have two buttons on a Lightning Web Component on a record page. When each is clicked, the code they run is virtually identical, so I want to reuse the code as much as possible. However, I cannot figure out the best way to do it. I can pass the button name into the code, but when I try to put the "let record + fields" code into the switch or conditional if statements, it doesnt work. I need to pass a different field name into the 'let record' statement, depending on which button is pressed. 
 
handleActivateBuyerSide() {
        this.loading = true;
        
        let record = {
            fields: {
                Id: this.recordId,
                VirtualTCStatus_BuyerSide__c: 'Active',        
            },
        };
        updateRecord(record)
            // eslint-disable-next-line no-unused-vars
            .then(() => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Success',
                        message: 'Record Is Updated',
                        variant: 'success',
                    }),
                );
                this.loading = false;

            })
            .catch(error => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error on data save',
                        message: error.message.body,
                        variant: 'error',
                    }),
                );
                this.loading = false;

            });
    }
    handleActivateSellerSide() {
        this.loading = true;
        
        let record = {
            fields: {
                Id: this.recordId,
                VirtualTCStatus_SellerSide__c: 'Active',        
            },
        };
        updateRecord(record)
            // eslint-disable-next-line no-unused-vars
            .then(() => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Success',
                        message: 'Record Is Updated',
                        variant: 'success',
                    }),
                );
                this.loading = false;

            })
            .catch(error => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error on data save',
                        message: error.message.body,
                        variant: 'error',
                    }),
                );
                this.loading = false;

            });
    }

 
I am building a custom page, and I want certain items to show depending on which step in a path is clicked, but not yet active/updated. Pretty much similar to the built-in Guidance for Success on objects; as you click each step, the data below changes, even before you Mark as Current Step. 

Here is my lightning-progress-indicator path. I would love to get the value of the selected lightning-progress-step
<lightning-progress-indicator id="phasePath"  current-step={phaseValue} type="path" variant="base" onclick={handlePathClick}>
                                <lightning-progress-step label="Welcome" value="PX"></lightning-progress-step>
                                <lightning-progress-step label="Getting Started" value="P0"></lightning-progress-step>
                                <lightning-progress-step label="Get Licensed" value="P1"></lightning-progress-step>
                                <lightning-progress-step label="Orientation" value="P2"></lightning-progress-step>
                                <lightning-progress-step label="Mentorship" value="P3"></lightning-progress-step>
                            </lightning-progress-indicator>

 
Hey fam, I have a trigger that runs after an Closing is complete/closed that will sum the other Closings volume and commission. Then, cycle through the Goals the User has added for this year, and update their progress towards their goal. This is one of my first Triggers, and I am obviously new to the game. I found some guides on bulkifying the code, but most of those were for single object or related object triggers. These two objects are unrelated. Is there anything I can do to optimize this? Thanks! 
trigger UpdateGoals on pba__Closing__c (after update, after insert) {
    
    //	loop through each closing that is updated/insert.
    for(pba__Closing__c c : Trigger.New)
    {
        //	If the closing is CLOSED, then do some work. 
        if (c.Closing_Status__c == 'Closed'){
            
            String Owner = c.OwnerId;
            Date d = c.ClosingDate__c;
            Integer yr = d.year();

            //	get the sum of fields on the Closed closings of the closed date of the closing, by the owner. 
            AggregateResult[] getSums = [SELECT SUM(Sales_Volume__c) sales_volume, 
                                         SUM(Agent_True_Gross_Commission_Total__c) sum_commissions,
                                      
                                         FROM pba__Closing__c
                                         WHERE Closing_Year__c = :yr
                                         AND Closing_Status__c = 'Closed'
                                         AND OwnerId = :Owner
                                        ];  

            //	loop through each GOAL of the associated user and year
            for (Goal__c g : [SELECT Id, Name, Actual_Value__c, OwnerId, Goal_Field__c
                              FROM Goal__c
                              WHERE OwnerId = :Owner
                              AND Year__c = :yr ]) 
            {
                //	CASE through Goal_Field__c to update 
                switch on g.Goal_Field__c {
                    when 'Sales_Volume' {
                        g.Actual_Value__c = Integer.valueOf(getSums[0].get('sales_volume'));
                        update g;
                    }
                   
                    when 'Net_Commission' {
                        g.Actual_Value__c = Integer.valueOf(getSums[0].get('sum_commissions'));
                        update g;
                    }
                    
                    
                }                
            }
        }
    }
}


 
What do you use when plain text, letterhead, custom HTML, and Visualforce email templates won't work?!
First, it's infuriating to use Custom HTML email templates and IF statements; they are extremely finicky! For example, I can't get this to show the true OR false elements:
{!IF(ISBLANK(pba__Closing__c.Inspection_Date__c), 'If you have not already scheduled an inspection, let me know when you would like to do one, and I would be happy to schedule for you. If you have an Inspector that you would prefer to use, please let me know. If you need suggestions, I would be happy to provide them and or schedule it for you.', 'The Inspection is scheduled for ' & pba__Closing__c.Inspection_Date__c) }


And I have tried with single and double quotes (and any other possible variation. 

So, I thought using a Visualforce email template might be the solution. The email will be going to a Contact record and its relatedTo a Closing record. When I get all my code in and then add the signature for the Closing Owner, it gives an error: 
Error: Invalid field MobilePhone for SObject Name
<p>{!relatedTo.Owner.Name} <br/>{!relatedTo.Owner.Title} <br/>{!relatedTo.Owner.MobilePhone}


Apparently it understands Name and Title, but not MobilePhone (or other fields I want to use in the signature)! 

So, I am at a loss! 
 
We're using an LMS app, LearnTrac, and I would like to automatically assign LESSON TWO to a user when they complete LESSON ONE.
The infomation I am given by the app is:
LearnTrac exposes the following Apex methods to developers :

redwing.LMS_API.upsertAssignments(Set<Id> userIds, Id trainingPlanId)

Creates/Updates assignments for the provided set of user ids to the specified Training Plan Id.

Parameters

userIds

Type : Set<Id>

Set of User Ids that will be assigned to the specified training plan.

trainingPlanId

Type : Id

Id of the Training Plan to which the set of user ids will be assigned to

Return Value

Type : Void

Therefore, I have built a trigger that will check to see if a certain Learning Assignment is 'Completed' and then run this class with the info for the new assignment. It doesnt work. So, I have taken a step back and just tried to execute the code in anonymous window. It still doesnt do what I want, but doesn't error. The logs don't seem helpful. How can I get more info back about what is going on?

Here is the anon block I run:
Id trainingPlanId = 'a2e0v0000001zohAAA';
Set<Id> userIds= new Set<Id>();
userIds.add('0056A000001VrA3QAK');
        
redwing.LMS_API.upsertAssignments(userIds, trainingPlanId);

 

Hi everyone, 

I'm trying to set up a formula field to return specific text and I'm hoping it's possible to use nested if statements with multiple case functions.

So, if the value in a specific field is one value, use the first case function and, if it's another, use the other case function. 

Here's what I'm trying to use but can't seem to get the syntax to work. 

IF(North_American_Parent_Account__c = TRUE,
CASE(Corresponding_User_Role__c,"Corporate","Corporate (In North America)","Student","Student (In North America)","Educator","Educator (In North America)","Bookstore","Bookstore (In North America)",
IF(North_American_Parent_Account__c = FALSE,
CASE(Corresponding_User_Role__c,"Corporate","Corporate (Outside North America)","Student","Student (Outside North America)","Educator","Educator (Outside North America)","Bookstore","Bookstore (Outside North America)"
,""
))))

Any help would be much appreciated!

I have a list of Events, some of them are Related To a custom object (Closing__c). I have Apex and SOQL code to query the Events into a List. I would also like to get the data from a field  (i.e. Summary__c) on the Closing that is related to the Event, so I can display that in a LWC. I can get basic info in SOQL using: 
SELECT Id, Subject, WhoId, WhatId, What.Id, Who.Id, Who.Name, What.Name
          FROM Event
But I would like to access other fields on the Closing__c record. What's the best way to do that? 
 
I'm trying to add URL's to salesforce web to lead platform but I'm unsure where to find the setting for this. The example url I would like to be able my salesforce web to lead would be localhost:1000 however i dont know where in the settings I can configure this.
Hi,

I am getting an error as below. Any help is appreciated.

"abc.cls gets user input from
element recordid. This input is later concatenated by the application directly into a string
variable containing SQL commands, without being validated. This string is then used in method
XXX to query the database select, at line 137 of forceapp/
main/default/classes/abc.cls, without any additional
filtering by the database. This could allow the user to tamper with the filter parameter."

112. public static string abc(String recordId) {

137. public static XXX(String recordId)
    {
153. Account act= [SELECT Id, Name, Member_Number__c, Phone FROM Account where Id = :recordId LIMIT 1];

what kind of validation do I need to do for the field recordID prior to that database query. Could anyone please help?

Regards
Amar
I created a public site for my visualforce. On my page, I'm don't using Apex class, just Visualforce.
 
My page:
 
<apex:page standardController="Curso__c" recordSetVar="cursos">
    <apex:pageBlock title="Plataforma de Cursos do Mario">
        <apex:form >
            <h1> Bem vindo, escolha um curso e bons estudos! </h1>
            <br/><br/>
            <apex:pageBlock title="Cursos Disponíveis:">
                <apex:repeat value="{!cursos}" var="curso">
                    <h1>Nome: {!curso.Name}</h1>
                    <br/><br/>
                    <apex:outputText value="{0,date,dd'/'MM'/'yyyy}">
                        Data do curso:<apex:param value="{!curso.CreatedDate}" /> 
                    </apex:outputText>
                    <p></p>
                    <apex:image value="{!curso.Link_da_Imagem_do_Curso__c}" width="350px" height="200px" />
                    <p>{!curso.Descri_o_do_Curso__c}</p>
                    <br/>
                    <button type="button" onclick="location.href='{!curso.Link_do_Curso__c}'">ACESSAR CURSO</button>
                    <hr/>
                    <br/><br/>
                </apex:repeat>
            </apex:pageBlock>
        </apex:form>
    </apex:pageBlock>
</apex:page>

In Developer Console -> preview, my page works and she lists my Courses (list of Curso__c) !
 
User-added image

But on my public site, the list doesn't work... 

User-added image

This is a link for my public site: https://cursosmario-developer-edition.na156.force.com/
 
He doesn't list my Courses... Why?? Please, help me
Facing issue in Current Date in LWC.

I am auto populated current date in date filed. below is my code in lwc JS.

 connectedCallback() {
             
        //Current Date 
        this.currentDate = new Date().toISOString();
      
    }


but this not working s perfectly Indain stand time . GMT centeral day light time showing one day after. Calender it is showing 24 but autopoulated date is 25.Any one hlep on this issue.

Thanks
C. Nagarajan 
Hello Trailblazer's , 

I want to add video into my salesforce org. 
How can i do it , and how can i add video link reference in salesforce, and in which object, label or so ?

I can do it through web tab first option , and second is Iframe tag using LWC(but for which , video needs to be already uploaded on youtube or any other public URL or site to which i can embed it to iframe)
please tell me or post any link or blogs or any video about how can i add videos in salesforce?
or tell me how can i raise this idea to salesforce ?

Thanks in advance! 
 
On our Closing object we have 20+ Date fields for deadlines. I've written a Trigger that will upsert those deadlines to related Events when the date is set or changed, pulling in descriptions from custom meta data type.

However, for each meta data record it loops through all fields on the Closing, which I suspect is not ideal. I suspect there is a way to only include the DATE fields to cycle through, instead of all fields. Is that possible? Here is the code:
 
String objApi = 'pba__Closing__c';
        // 	get Object field map
        Map <String, Schema.SObjectField> fieldMap =  Schema.getGlobalDescribe().get(objApi).getDescribe().fields.getMap();
        
        //	get activity descriptions meta data records for the Object
        List<Activity_Description__mdt> ads = [SELECT Id, Label, Object_API_Name__c, Field_API_Name__c, Description__c, All_Day_Event__c 
                                               FROM Activity_Description__mdt
                                               WHERE Object_API_Name__c =: objApi];
        
        // for each record in the batch
        for(pba__Closing__c cl : newClosing){
            // for each Activity Description found for the object type
            for(Activity_Description__mdt ad : ads){
                // for each field on the object
                for(Schema.SObjectField sfield : fieldMap.Values()){
                    String fieldApi = sfield.getdescribe().getname();
                    //	if the field api on the Closing matches the field api name on the Activity Description
                    if(fieldApi == ad.Field_API_Name__c) {
                        // DO LOGIC HERE                       
                        
                    }
                }   
            }
        }

 
Let,s say I have amount Its value is 2000 , ANd when I go to inline edit and I add +10% it should increase the value by 10% or -10% , then it should decrease the value by 10% in Lightning data table.
I have created a flow for a service appointments and I am trying to create a custom button with the flow in the url. my link for the flow button is below
/flow/Send_SMS_to_Customer?SAPPId={!ServiceAppointment.Id}retURL=/{!ServiceAppointment.Id}

When i click the button I get An unhandled fault has occurred in this flow

User-added image

This is the Get Record element 

User-added image
 
Hi ! I am working with Lighting Web Components, and looking to understand how to get meaningful error codes from the createRecord() function. 

The example I am working with is an Opportunity Create javascript function. It is supposed to fail because it is missing the Opportunity Stage Name. It fails as expected, however, the error message is not at all helpful. Here is the error message that I am receiving:
:[object Object] reduce: An error occurred while trying to update the record. Please try again. status:400 undefined. 
My question is how can I go about getting meaningful error messages in this case. Do I have to enable some kind of logging in Salesforce Options? Write a custom Apex Class that throws better errors? Or is there a different way to access the createRecord() error return to actually see what the error is?

Here is the javascript code:
 
import { LightningElement, track  } from 'lwc';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { createRecord } from 'lightning/uiRecordApi';
import { reduceErrors } from 'c/ldsUtils';
import OPPORTUNITY_OBJECT from '@salesforce/schema/Opportunity';
import NAME_FIELD from '@salesforce/schema/Opportunity.Name';
import CloseDate_FIELD from '@salesforce/schema/Opportunity.CloseDate';
import StageName_FIELD from '@salesforce/schema/Opportunity.StageName';



export default class LdsCreateOpportunity extends LightningElement {
    @track opportunityId;

    // errorInfo = undefined;
    name = '';
    closeDate = new Date('December 17, 2019 03:24:00');
    stageName = 'Prospecting';
   // @track error;



    handleNameChange(event) {
        this.opportunityId = undefined;
        this.name = event.target.value;
    }

    createOpportunity() {
        const fields = {};
        fields[NAME_FIELD.fieldApiName] = this.name;
        fields[CloseDate_FIELD.fieldApiName] = this.closeDate;
        // fields[StageName_FIELD.fieldApiName] = this.stageName; // - this breaks the save by omitting the required stage name field


        
        const recordInput = { apiName: OPPORTUNITY_OBJECT.objectApiName, fields };
        createRecord(recordInput)
            .then(opportunity => {
                this.opportunityId = opportunity.id;
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Success',
                        message: 'Opportunity created. Message goes here!',
                        variant: 'success'
                    })
                );
            })
            .catch(error => {



                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error creating record',
                        message:'Here is the error:' + error.body +  ' reduce: ' + reduceErrors(error).join(', ')  + 'status:' + error.status + '  ;status text' + error.statustext,
                        variant: 'error'
                    }
                    )

                    
                );
            });
    }
}

 
I am building a list of our preferred vendors and want to show it in a custom lightning web component. I would like all vendors of the same 'Category' to be listed together, with just one header. 
User-added image

As you can see, when there are multiple vendors in one cateogry, the category name/head displays twice. I am sure I could get what I need, through making multiple calls in apex (one for each category), but it seems ideal and more efficient to get all the vendors in one call, and then just adjust their grouping in the lightning web component. 

I query the data in the controller, then display it in the lwc as such: 
<template for:each={vendors.data} for:item="vendor">
                <div key={vendor.Id}>                   
                    <div class="slds-text-heading_small">{vendor.Category_Name__c}</div>
                    <p><lightning-formatted-rich-text value={vendor.Vendor__c} ></lightning-formatted-rich-text></p>
                </div>
            </template>

 
I have two buttons on a Lightning Web Component on a record page. When each is clicked, the code they run is virtually identical, so I want to reuse the code as much as possible. However, I cannot figure out the best way to do it. I can pass the button name into the code, but when I try to put the "let record + fields" code into the switch or conditional if statements, it doesnt work. I need to pass a different field name into the 'let record' statement, depending on which button is pressed. 
 
handleActivateBuyerSide() {
        this.loading = true;
        
        let record = {
            fields: {
                Id: this.recordId,
                VirtualTCStatus_BuyerSide__c: 'Active',        
            },
        };
        updateRecord(record)
            // eslint-disable-next-line no-unused-vars
            .then(() => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Success',
                        message: 'Record Is Updated',
                        variant: 'success',
                    }),
                );
                this.loading = false;

            })
            .catch(error => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error on data save',
                        message: error.message.body,
                        variant: 'error',
                    }),
                );
                this.loading = false;

            });
    }
    handleActivateSellerSide() {
        this.loading = true;
        
        let record = {
            fields: {
                Id: this.recordId,
                VirtualTCStatus_SellerSide__c: 'Active',        
            },
        };
        updateRecord(record)
            // eslint-disable-next-line no-unused-vars
            .then(() => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Success',
                        message: 'Record Is Updated',
                        variant: 'success',
                    }),
                );
                this.loading = false;

            })
            .catch(error => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error on data save',
                        message: error.message.body,
                        variant: 'error',
                    }),
                );
                this.loading = false;

            });
    }

 
I am building a custom page, and I want certain items to show depending on which step in a path is clicked, but not yet active/updated. Pretty much similar to the built-in Guidance for Success on objects; as you click each step, the data below changes, even before you Mark as Current Step. 

Here is my lightning-progress-indicator path. I would love to get the value of the selected lightning-progress-step
<lightning-progress-indicator id="phasePath"  current-step={phaseValue} type="path" variant="base" onclick={handlePathClick}>
                                <lightning-progress-step label="Welcome" value="PX"></lightning-progress-step>
                                <lightning-progress-step label="Getting Started" value="P0"></lightning-progress-step>
                                <lightning-progress-step label="Get Licensed" value="P1"></lightning-progress-step>
                                <lightning-progress-step label="Orientation" value="P2"></lightning-progress-step>
                                <lightning-progress-step label="Mentorship" value="P3"></lightning-progress-step>
                            </lightning-progress-indicator>

 
We are running into the following exception after updating a record in our org that fires a workflow: 
We can't save this record because the “Account: IAL Email Changes” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to update records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: ContactTrigger: execution of AfterUpdate caused by: System.RequiredFeatureMissingException: Field 'ProfilePhotoId' on object 'User' is not supported. One or more features must be enabled to access this field. () . You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1216016854-20514 (-1794866724)

We are unable to find any documentation about this ProfilePhotoId field or how to enable it. We are also unsure why this is even happening because we can't find anything in the org that is referencing this field.

Has anyone else encountered this?