• Brian Good 8
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I know this can be simplified if you are changing the Record Type with Actions or Quick Actions.  However, I'm using a flow because there are some variables I'm processing through loops and decisions to determine which Record Type I'd like to change to.  

I'm looking to have my users click a button, run the flow, and refresh the page to reflect the new record type (and corresponding page layout).  If I do a Screen Flow I end up having to put an end screen and have them click finish to get through the flow and refresh the record.  I haven't really looked into using an autolaunced flow, but maybe that's a possibility?

Is a custom button the way I should go?  User clicks the button, passes the recordId and kicks off the flow, runs the flow, and then refreshes the page?  Just not quick sure what that all looks like.  Any help is appreciated!
I have created a table to house basic information for putting into an email (subject, intro etc). I will call this EMAIL. I have created a child table to house the content for emails, so each EMAIL object can have one or more CONTENT objects.
I have created a many-many relationship between CONTACT and EMAIL via another table called LINK.
I have two email templates. One is 'Custom' and as follows. This works fine, when I trigger it (by adding a LINK object),  I get an email send to my Contact with both the expected merge fields filled in.
Dear {!CONTACT.FirstName}, Intro: {!EMAIL__c.Introduction__c}
However, I have a second template created using Visualforce (below). If I switch my email alert to use it instead, then perform the same action to get the email to be sent to a Contact, neither the Contact's Name or the EMAIL Introduction is merged in! Also note that, if I use this template and 'Send Test and Verify Merge Fields', entering my Contact and EMAIL ID causes the merge from both objects to work perfectly! Can anyone offer any advice?
Thanks
<messaging:emailTemplate recipientType="Contact"
    relatedToType="Queued_Email__c"
    subject="ed test 3">
    <messaging:htmlEmailBody >
        <html>
            <body>
            <p>Dear {!recipient.name},</p>
            <p>{!relatedTo.Introduction__c}</p>
            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>