Skip to main content

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

Hi all. I have a Lightning flow that is triggered by an Action button on a page. I need to end the flow and reload the page. Currently, the flow ends with a "your flow is finished" message that people need to close the dialog box. Note: this is done in Lightning flow, not Apex. I've tried using Navigate Elsewhere but come up with an error:

 

Error Occurred: Action failed: c:navigateEverywhereLFA$controller$invoke [Cannot read property 'toLowerCase' of undefined]

 

How do I accomplish this? Total Friday brain-freeze here.

6 件のコメント
  1. Michael Brown (Salesforce) Forum Ambassador
    2022年12月2日 17:48

    Good stuff @Eric Smith! I just ran into the same issue myself and this fixed it

0/9000

Hello Folks,

 

I am trying to complete App Customization Specialist superbadge I have completed all the requirements to complete the challenge #2  but I am just not getting what am I doing wrong.

 

I am getting an error "The '# of Volunteers Still Needed' field on the 'Volunteer Shift' record is not working as expected."

 

I have spent too many hours trying on it but no luck:-(. If some will be able to help me will be much appreciated.

 

I have configured the fields as below

 

Object Name:  Volunteer Shift

Object API:  Volunteer_Shift__c

 

Field Label:  # of Volunteers Still Needed

Field Name:  of_Volunteers_Still_Needed

Field API: of_Volunteers_Still_Needed__c

Data Type:    Formula  

Decimal Places:    0  

IF( (Desired_of_Volunteers__c - Shifts_Taken__c ) <= 0 , 0 , Desired_of_Volunteers__c - Shifts_Taken__c )

FLS: Visible to all profiles

 

Field Label:  Desired # of Volunteers

Field Name:  Desired_of_Volunteers

Field API: Desired_of_Volunteers__c

Data Type: Number(3, 0)

Lenght: 3

Decimal Places:    0  

Required , Unique: False

FLS: Read and Edit to all profiles

 

Field Label: Shifts Taken

Field Name: Shifts_Taken

API Name: Shifts_Taken__c

Data Type: Roll-Up Summary

Summarized Object: Volunteer Shift Worker

Filter Criteria: Status EQUALS Confirmed, Completed

Summary Type: COUNT

FLS: Read to all profiles

 

To clear this challenge shall I need to see any other fields/configuration form other objects....

11 件のコメント
  1. 2022年11月3日 6:52
    Hey @richard muhumuza thanks for your suggestion I completed it long back🙂 cheers 🍻
0/9000

I am trying to use a technique to update fields with some preface information. That is that I've come up with a way to include the Updated by and Updated on ahead of the information being added to the text field. EXAMPLE:    Bob Moalli On 2/2/2021 updated the NPR from 123456 to 345678.

 

123456 to 345678 are coming from fields OldNPR__c to NewNPR__c

 

I'm being asked to present these two fields as currency EXAMPLE

 

Bob Moalli On 2/2/2021 updated the NPR from $123,456 to $345,678.

 

I'm looking for any ideas on a solution to make this conversion. Any thoughts greatly appreciated.

 

Thanks Bob.

8 件のコメント
  1. 2022年8月4日 20:11

    Thanks @Eric Smith I was able to get that working in our flow and we've turned off one more process builder in the transition.   I appreciate you getting back to me.

    Bob.

0/9000

Was toying around with the unsurpassed data table component for flow by @Eric Smith and found two things which are perhaps nice to share with the community:  

 

1. After trying a bit I found it is possible to add 'dummy' records in a flow to the collection displayed in a table. When would that be useful? For example when you want to display a project schedule overview including empty dates without activities for example (see screenshot). This does require you to use a dummy record id.

This record id has to be of the same object but can be lengthened. For example with the number of the counter in a loop. It does not matter how long the id is, as long as it is unique within the record set displayed by the table. (I have not dived into the code, but the data table seems to use the first part of the id to decide what kind of object it is dealing with?). 

 

2. Creating dummy records and 'shallow' copies for activities spending multiple days does render the option to automatically link the name to the record useless because it now links to fake record id's. Luckily you can change field labels in the data table too. During the process of creating a formula link to serve as the link to the record instead, I tried some url-hacking. After experimenting a bit I found you can actually have an edit modal pop-up right from the table, with the flow table still there in the background! All it requires is that you create a text formula field with the following formula: 

HYPERLINK("/lightning/r/ObjectName__c/" & Id & "/edit?layoutType=FULL&backgroundContext=", Name, "_self") 

ObjectName__c should obviously be replaced by the name of the object of your liking, and possibly you also want another text field instead of the Name field (e.g. could be a static 'Edit' too). 

 

After some tweaking, you can end up with something looking like the pictures attached! 

 

What is there to wish for:

- With longer periods or complex flows in general you will hit the maximum of 2000 iterations easily. It would be great if that limit would be higher! I hope there is no technical debt that prevents flows from scaling up to apex capabilities in that respect (since they were probably not designed to do massive database manipulations in the first place)... 

- For interface enhancement scenarios supplied via flow it would be great to have a refresh option that does not require a complete rerender of the flow. This seems difficult in the context of flow however: the soql happens in the context of the execution of the flow and not through the wire service. 

11 件のコメント
  1. 2022年1月23日 13:12

    @Nico Caracciolo nice to read your use-case! I did something like that too when I needed a quick timesheet app. It creates a (partly prefilled) row for every day in a period the user selects. @Eric Smith in this case it was a bit bothersome that we can only return either selected or edited rows btw. I can imagine why that wouldn't be necessary if you pass a 'normal' collection to the table. But in these scenarios with 'dummy' records, it could be useful actually!

0/9000

I've been poking through unofficialsf.com, and installed the "Get Field Information" action. ( https://unofficialsf.com/getfieldinformation-get-fields-for-an-object/ )  I wanted to use a flow to loop through the output of an object's fields, decide their data type, then compare two example records of that object to determine if their values for a specific field are blank/empty/null to merge them.

 

  • when I use the action and follow it with a Loop, the resource does not appear to be available to loop through. 
  • If I add an assignment in the middle to assign the Get Field Information output to a collection variable, I'm not sure what data type to use. Text seems most generic, but otherwise this seems to be a dynamic data type.  Should I try to set it to Apex defined?  If so- what is the Apex class to define Contacts?
  • If I created the collection variable as a Text data type, the Loop Collection variable also needs to be text.  Typically I would create the loop variable as a number, and just add one each loop, but a number variable would not be available here.  What am I missing?

Ultimately I would need to reference the field name and data type to appropriately compare the values of the two records I have.  What am I missing?

12 件のコメント
  1. 2021年12月14日 16:32

    @Eric Smith,

     

    Thanks very much for the response.  I likely gave up on this approach some time ago and probably worked around the issue another way.

0/9000

Hi everyone,

How can I  Upload multiple file and want to show the attachment name and type in the aura component? #Salesforce  #Ask An Expert #LCAnswers

5 件の回答
  1. 2021年6月22日 6:13

    Hi Ananya,

    you can get the idea of uploading multiple file from this link 

    https://salesforcecodex.com/salesforce/upload-multiple-files-in-lightning-component/

    here is the reference from the salesforce library

    https://developer.salesforce.com/docs/component-library/bundle/lightning:input/documentation

    after uploading you can get the idea from this article to see how to use those files in aura component

    https://www.forcetalks.com/blog/files-attachments-and-notes-salesforce-lightning-components-force-com/

    hope it helps

     

    Best regards

    Piyush Singhal

0/9000

 @Eric Smith 

Hello Eric,

 

I have been using the most up to date versions of the Unofficial SF Data Table (and required component packages) to build a record specific inline edit Flow feature for a client. 

 

I am not well versed in LWC component development (JavaScript, CSS etc. languages).

 

The issue I am experiencing is when a picklist is attempted to be edited, the picklist values are hidden behind the rows displayed in the table. I have attached a screenshot for reference.

 

Do you have any guidance on how to make the picklist selection options visible in front of the table? Like the behavior of the date fields. Or perhaps a starting place of material that I can begin to research to solve this issue? 

Thank you for your assistance.

 

@Cody Smith 

9 件のコメント
0/9000

Hi All,

 

I am looking for some advice or guidance with a use case. Let me attempt to explain it. 

We have 5 record types for a particular object. We need to ensure that when a particular picklist field options is changed on one record type, then we need to ensure that when creating the next record type you can only transition to select record types. 

Basically, when transitioning from one record type to the next, have a rule of some sort to limit the new record types.

So, Create Record A with Record type A and picklist option A. When transitioning to another record B, based on picklist option A in the previous record, you can only create a record type C because you can only transition to options D, E, F.

So many IF scenarios.

 

Is this possible with flows ?

 

@Melody Lwo @Eric Smith 

2 件のコメント
  1. 2021年5月27日 0:55
    Thanks @Eric Smith

    ! How do I handle the restricted pick lists whilst creating the new record ? So in my example - option A can only transition to D,E,F in record type C, even if we have more than DEF on that record type? Secondly, this would be an autolaunched flow right? Or would you recommend it is a screen flow?

    Thanks again!

0/9000

Hi friends. I am struggle bussing hard today with Navigate Everywhere. I'm attempting to go to a related list on the Account page for a custom relationship. This makes no sense to me, because the error is telling me I'm missing information, even though I've input the four required fields (and confirmed that the values are correct). Clearly, this is a case of I am missing something that's probably really obvious and I've just been staring at it for too long. Any thoughts? Screenshot of my flow debugging Error message attached.

3 件のコメント
  1. Eric Smith (Retired) Forum Ambassador
    2021年5月24日 21:53
    @Carissa Christensen I have a fix for this and will let you know as soon as a new install link is available.
0/9000

I am attempting to upgrade our lookupFSC from 2.32 -> 2.4 in order to take advantage of greater stability and the "Search This" function. While updating I am encountering an error asking me to uninstall the current version before installing the new one. My issue is that to uninstall the current version I am also told I'll need to remove any use of the lookupFSC component completely which is currently in 10+ flows and countless versions.

 

Does anyone have any shortcuts to updating a package without having to manually remove any use of the previous version though-out an instance?

 

Thank you ahead of time for any assistance.

4 件のコメント
0/9000