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
Maria FranklinMaria Franklin 

why won't my flow work?

Hello,

Hoping someone can help me with these two Screen Flows.  

Both screen flows should trigger when User clicks on the 'New Submission' button, which is embedded on two separate Community page layouts.

One page is for Users looking to create a New Submission, under the custom object named, 'GROUP.'
User-added image

Other page is for Users looking to create a New Submission, under the custom object named, 'BROKER GROUP.'  
User-added image

Flow #1, is for internal business use. This Flow works perfectly. 

  • Flow 1 should fire when User clicks on action button labeled, 'New Submission' (note: Submission is a custom object). 
  • This action button is on Page Layout A - Group
  • All appropriate profiles have been modified to allow users of this profile to access this button and it's fields. 

Flow 1 details broken down by Flow Elements

Flow Element #1: GETRECORD
Custom Object: Group
All Conditions Are Met (AND): (Field) Id EQUALS (Value) {!recordId}
Sort Order: Not Sorted
How Many Records to Store: Only the first record
How to Store Record Data: Automatically store all fields

Flow Element #2: SCREEN
Create Record

User-added image

Flow Element #3 - CREATE RECORDS
How many records to create: One
How to set record fields: Use separate resources, & literal values 
Custom Object: Submission
Set Fields for the Submission

  • Carrier_Name__c <--  {!CarrierValue}
  • Coverage_Type__c <-- {!Coverage_Type}
  • Full_Time_Employees__c <-- {!Full_Time_Employees}
  • Group_Name__c <-- {!GroupRecord.Id}
  • Group_Size__c <-- {!GroupRecord.Group_Size__c}
  • Group_State__c <-- {!GroupRecord.State__c}
  • Name <-- 1
  • Non_WP__c <-- TRUE
  • PolicyNumbers__c <-- {!Policy_Numbers}
  • RecordTypeId <-- 012e0000000BmLgAAK
  • Renewal_Date__c <-- {!Renewal_DateValue}
  • Policy_Effective_Date__c <- {!Policy_Effective_Date}
  • Premium__c <-- {!Premium}
  • Renewal_Status__c <-- {!Renewal_Status}
  • Submission_Status_Description__c <-- Approved
  • Submission_Status__c <-- Approved
  • Waiting_Period_c <-- {!Waiting_Period}

Manually assign variables: YES
Store Submission ID in Variable: {!New_SubmissionId}


Flow Element #4 - GET RECORDS
Custom Object: Submission
All Conditions Are Met (AND): (Field) Id = {!New_SubmissionId}
Sort Order: Not Sorted
How many records to store: Only the first record
How to store record data: Automatically store all fields

Flow Element #5 -  UPDATE RECORDS
How to find Records to Update and Set Their Values: Specify conditions to ID records and set fields individually
Custom Object: Submission
All Conditions Are Met (AND) (Field) Id = {!Non_WP_Submission.Id}
Set Field Values for the Submission Records
(Field) Name (Submission #)  <-- (Value) {!Non_WP_Submission.Non_WP_Submission_Number__c}

END

---------------------------------------------
FLOW #2 - For EXTERNAL Business Use 
This Flow DOES NOT work. I'm receiving the following Flow Error:

This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [Group_Name__c].
  • Flow 2 should fire when User clicks on the action button labeled, 'New Submission' (note: Submission is a custom object). 
  • This action button is on Page Layout B - Broker Group
  • All appropriate profiles have been modified to allow users of this profile to access this button and it's fields. 


Flow 2 details broken down by Flow Elements

Flow Element #2: GETRECORD
Custom Object: Broker Group
All Conditions Are Met (AND) (Field) Id =(Value) {!recordId}
Sort Order: Not Sorted
How Many Records to Store: Only the first record
How to Store Record Data: Automatically store all fields


Flow Element #2: SCREEN
Create Record


User-added image
 

Flow Element #3 - CREATE RECORDS
How many records to create: One
How to set record fields: Use separate resources, & literal values 
Custom Object: Submission

Set Fields for the Submission

  • Carrier_Name__c <--  {!Carrier}
  • Coverage_Type__c <-- {!Coverage_Type}
  • Broker_Group_Name__c <-- {!BrokerGroupRecord.Id}
  • RecordTypeId <-- 012Dw000000C8LTIA0
  • Renewal_Date__c <-- {!Renewal_DateValue}
  • Policy_Effective_Date__c <- {!Policy_Effective_Date}
  • Full_Time_Employees__c <-- {!Full_Time_Employees}
  • Group_Size__c <-- {!GroupRecord.Group_Size__c}
  • Group_State__c <-- {!GroupRecord.State__c}
  • Name <-- 1
  • Non_WP__c <-- TRUE
  • PolicyNumbers__c <-- {!Policy_Numbers}
  • Premium__c <-- {!Premium}
  • Renewal_Status__c <-- {!Renewal_Status}
  • Submission_Status_Description__c <-- Approved
  • Submission_Status__c <-- Approved
  • Waiting_Period_c <-- {!Waiting_Period}

Manually assign variables: YES
Store Submission ID in Variable: {!New_SubmissionId}

Flow Element #4 - GET RECORDS
Custom Object: Submission
All Conditions Are Met (AND): 
(Field) Id = {!New_SubmissionId}
Sort Order: Not Sorted
How many records to store: Only the first record
How to store record data: Automatically store all fields

Flow Element #5 -  UPDATE RECORDS
How to find Records to Update and Set Their Values: Specify conditions to ID records and set fields individually
Custom Object: Submission
All Conditions Are Met (AND): (Field) Id = {!Non_WP_Submission_BrokerGroup.Id}

Set Field Values for the Submission Records
(Field) Name (Submission #) <-- (Value) Non_WP_Submission_BrokerGroup.Non_WP_Submission_Number__c

END

Again, the error I received when clicking on Page Layout B - Broker Group's 'New Submission' button was: 

"This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [Group_Name__c]."

  • I verified that Page Layout B - Broker Group does not require the field 'Group_Name__c.'
  • Additional details:
    • For the GROUP object
      • Field Label: Group Name
      • API Name: Name
      • Field Access: Read ONLY
      • FLS: Visible
      • Where is this used: UNAVAILABLE
      • RecordType for necessary profiles: Master
    • For the BROKER GROUP object
      • ​​​​​​​Field Label: Broker Group Name
      • API Name: Name
      • Field Access: Required
      • FLS: Visible
      • Where is this used: UNAVAILABLE
      • RecordType for necessary profiles: N/AUser-added image


A BIG Thank YOU in advance!


Cheers