How Can We Help?

Salesforce Flow Explanation

In order to print from any object we have incorporated our logic in a flow solution. 

Out of the box, there are two flows that can be added on any standard or custom object in Salesforce. 

Two flows, “BarTenderPrint with default values” and “BarTenderPrint with user input,” were created as templates for your developer to clone and modify to suit a company’s individual labeling requirements.

“BarTenderPrint with default values” flow

  • This flow will print a label without user input.

In order to use this flow, you need to print with user input once successfully. The successful print will automatically save the Printer, Template name, and Object in a custom object called “PrintTemplateAssignment.” 

In order to print, follow the steps from the “BarTenderPrint with user input” flow. 

“BarTenderPrint with user input” flow

  • This flow will print a label with a Printer and a Template selected by the User.  The flow can be copied and used for any object. 

  • The flow is a screen flow that will walk the user through the process of capturing data for printing. 
  • The decision element will determine if the flow is called from a button on a record or a list view.

  • We are getting the Library and ContentDocument to show the User a list of available templates later in the flow.

  • The “actionGetPrinterListToPrint” will call a custom action that will get all the printers. The result is a list of printers that will be shown later in the flow. The name of the action is “apex-Ascent_LB__BartenderPrinterListInvocable.” Make sure you save the result, which is a list, in a collection of text variables. This list will be used by a custom component later in the flow.

  • The next screen is waiting for the User’s input. It’s the last step before the invocable action is called to print the label.

  •  The user needs to add labels to print; this is a number field
  • Template Name: it’s a choice from a picklist (we are using the collection from the GetContenDocument step)

  • Added the custom component “printerPicklistCmp” this will show a list of Printers. The only input required here is the name of the List. Add the list created for  “actionGetPrinterListToPrint.”

  • The print invocable is called to execute the print job. The required parameter is the record ID. However, as this version of the flow is waiting for user input, we have added the number of labels to print, the selected printer name, and the template file name.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?