function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bob Poliquin 9Bob Poliquin 9 

flow button on case object to send text message from messaging action

I have created a flow that should send a text message when a button is clicked. When i run a debug it works. When i go to create a new action button, the new flow does not show up where you would select the flow  in the dropdown

The flow is  an autoflow that should execute when i users clicks the button. 
I have a get records element and a messaging action in the flow, but i'm not sure if this is correct for a button. When i tried creating a New Button (Not an Action) the button doesnt should up on the lightning page. Also I am not sure if i have this Flow setup correctly to use in a button. I would like some help with this if possible

User-added imageUser-added image
.
User-added image
ShirishaShirisha (Salesforce Developers) 
Hi Bob,

Greetings!

You can not directly select the flow while creating the custom Button.In order to lauch the flow from the custom button you would need to select the type URL in Content Source dropdown and call the flow.

Please refer the sample custom button to lauch the flow in this document and proceed accordingly.

https://trailhead.salesforce.com/en/content/learn/v/projects/flow_calculate/flow_calculate_implement

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Bob Poliquin 9Bob Poliquin 9
Hi Shirisha,
I did try that but the button doesnt show up on the lightning page.User-added image
Bariskan Kilic 7Bariskan Kilic 7
Hey Bob,

1. Probably you are dragging your button from "Buttons" and dropping into Custom Buttons area. This will only make your button appear in classic. Instead, go to Mobile & Lightning Actions and drag your button to Salesforce Mobile and Lightning Experience Actions in the page layout.
2. I see that you are trying to pass your case id inside of the button flow link. That's wrong. Just create a text variable which is available for input inside of your autolaunched flow. The name should be exactly "recordId" or it will not accept.