0

I have a custom button that launches a flow. The flow contains the LWC. This works fine for admins in prod and for all users in my partial sandbox. I have the button created on the case object under Buttons, Links and actions. The button is a display type list button. I have then added the button to the search layouts for salesforce classic under the list view section.

As far as I can tell there isn't using a visualforce page or apex that is being called but all the information I can find is related to granting permissions through one of those methods.

The component has a simple combo box that allows for a selection and then handles the event by by navigating to a specific url. The JS is below. Any insights would be helpful.

import { LightningElement, api } from 'lwc';
import { FlowAttributeChangeEvent, FlowNavigationNextEvent, } from 'lightning/flowSupport';

export default class NewCaseCreation extends LightningElement {
    @api NewCaseCreation;
    @api TestProp;
    value = '';
    
     
    get options() {
        return [
            { label: 'Contact Center Case', value: 'Contact_Center_Case' },
            { label: 'Email to Case', value: 'Email_to_Case' },
        ];
    }

    handleChange(event) {
        }else if(event.detail.value == "Contact_Center_Case"){
            window.location.assign("https://customDomain.lightning.force.com/lightning/o/Case/new?count=1&nooverride=1&useRecordTypeCheck=1&navigationLocation=LIST_View&recordTypeId=0121U000000KISDSDSD"); 
        }else if(event.detail.value == "Email_to_Case"){
            window.location.assign("https://customDomain.lightning.force.com/lightning/o/Case/new?count=2&nooverride=1&useRecordTypeCheck=1&navigationLocation=LIST_View&recordTypeId=0121U000000DFDAAD"); 
        }
        this.NewCaseCreation = event.detail.value;
        this.value = event.detail.value;
    }
  

}

5
  • Does your non-admin user have access to run flows? Or is that flow currently restricted per profiles? Commented Mar 2, 2022 at 21:52
  • Where does the error occur? Does the flow launch, and you see it in the flow? Can you provide a screenshot? Does the flow work if you take the LWC off it? Please Edit your question with more details. I get the feeling this has nothing to do your LWC
    – Nick C
    Commented Mar 2, 2022 at 22:48
  • @KrisGoncalves No Flows are restricted and the users have run flows on the system permission. Commented Mar 3, 2022 at 0:44
  • 2
    Thanks you for taking the time to read through this and evaluate my issue. I feel really foolish. The flow was not activated. I guess it allows admins to navigate to non activated flows but not standard users. Commented Mar 3, 2022 at 0:52
  • 1
    Feel free to put an answer and accept your own answer. It happens to us all. Commented Mar 3, 2022 at 12:39

1 Answer 1

2

In the end the issue was that the new flow was not activated. Since the button navigated directly to the flow and admins have access to see the deactivated flows load on the front end it was working for them. Other users did not have access to deactivated flows hence the permission issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .