Discussions

 View Only
Expand all | Collapse all

How to Add an Email/Save Button To a Form

  • 1.  How to Add an Email/Save Button To a Form

    Posted 05-26-2021 14:23
    I'm having a few issues that I'm trying to solve for a few different apps both around email buttons and sending form information.

    First, I have a Job Site Inspection Form that I wanted to create a button for that would allow the form to be emailed to a user from a drop down. I know how to configure the email drop down, but wasn't sure how to create a button based off that drop down and not just create a notification off of the "Save & Close" button.

    The second is for a CRM I'm working on and a quote request form within it.
    I was wondering if there was a way to replace the Save & Close button on a form or if I can change it to "Save & Send". Basically I need a way for the user to save the form and also a way for the user to send the form to multiple users including themselves on CC when a checkbox is selected.

    I've figured out the notification to send a copy of the form upon clicking the "Save & Close" button and know I can add additional stipulations like if a checkbox is selected but I'm having a hard time stringing it all together.


    ------------------------------
    Peter Gacek
    ------------------------------


  • 2.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 10:28
    Hey @Mark Shnier (YQC),

    You had helped me with my issue last week getting tables to connect and said if I had some specific questions about making a particular URL formula then I could post back here. I didn't want to clog the other thread but I'm still struggling with creating a formula that emails the inspection form.

    I've looked through magic buttons and a few other discussions here and found this was the closest to my issue: "https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=dfc64d97-84cf-41a4-bdcf-92cb43487a33&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer"

    I downloaded Magic Buttons but don't see much specific to emailing a from but I could be misunderstanding. What I'm trying to achieve is a button on the same quote request form that will send the form to a specified user from a dropdown with the last modified on copy of the email. I'd like to do the same for a Job Site Inspection form app I created but I need to rebuild that app in the CRM as it currently doesn't have Record ID# to call from.

    I'm trying to understand and figure out the formulas but so far what I've come up with based on the previous discussions I read:

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#] & "&dfid=32"
    & "&tolist=" & [Send quote to:] 

    But it's showing up as a link and not a button and it doesn't like that my [Send quote to:] is a user field. I know I'm a bit far off here but any direction you could point me in would be greatly appreciated. 


    ------------------------------
    Peter Gacek
    ------------------------------



  • 3.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 11:35
    Are you trying to trigger an Email Notification or are you trying give the user a short cut to using the email button which is on a record and just trying to help them by populating the To Field.

    If the latter, then the formula would be

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#] 
    & "&tolist=" & UserToEmail[Send quote to:]) 


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 4.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 12:33
    I'm trying to give the user a short cut to using the email button on a form and want it to populate the To Field AND have the "Last Modified by", on copy for the email if it's possible.

    I tried your formula and it gives the error "The field [Send quote to:] is not compatible with the parameter field type" and won't let me save due to a missing parenthesis. I put one in after the UserToEmail so the formula reads:

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#]
    & "&tolist=" & UserToEmail([Send quote to:])

    which allows me to save the Field's properties but it's showing up as a hyperlink on my form when I save and load it.



    ------------------------------
    Peter Gacek
    ------------------------------



  • 5.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 12:37
    np,
    If you are now saying that it works then and your only problem is that you want it to appear as a button as opposed to a link then you can edit the field properties for that URL formula field and use the checkbox to display as a button and choose a colour for the button.

    There is not a way to configure the "cc".  but to can include the [Last Modified by] as a TO: recipient.

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#]
    & "&tolist=" & List (",", UserToEmail([Send quote to:]), UserToEmail([Last Modified by]))

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 6.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 12:56
    Mark,

    Thanks again! I think that did it, although I did get a QB error after saying:
    Cannot email an invalid quote!
    You cannot email this quote. Please select a valid quote and try again.

    But it did send the quote, and that might be because the quote wasn't attached to any opportunity in our system.

    I'll keep playing/testing and see if anything changes but thank you again!

    ------------------------------
    Peter Gacek
    ------------------------------



  • 7.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 13:36
    can I see your formula?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 8.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 14:03
    I think it's verbatim what you suggested:

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#]
    & "&tolist=" & List (",", UserToEmail([Send quote to:]), UserToEmail([Last Modified By]))

    Although, now it seems to be working when I created a quote off of an opportunity, if the quote isn't attached it gives me that error but still sends the email.

    Although it now brings up a new dialogue that allows me to edit the subject and body, is there a way to bypass that so it automatically sends it without checking?




    ------------------------------
    Peter Gacek
    ------------------------------



  • 9.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 14:06
    re:Are you trying to trigger an Email Notification or are you trying give the user a short cut to using the email button which is on a record and just trying to help them by populating the To Field.

    I suggest that you read up on Email Notifications. https://help.quickbase.com/user-assistance/creating_custom_email_tips.html

    Maybe that is what you really wanted all along.

    Then we can make a button to create a change in the record which would trigger the email notification.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 10.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 14:40


    You and I are in agreement, I actually prefer the Email Notification and it's what I originally had based off of the Save and Continue button but my co-worker I'm working with was hopeful that I could create a button that automatically sent an email with the form and the user who created it on copy.

    So your suggestion I'm assuming is to create create a button on the page that triggers the custom email notification? I've created a new notification, what would I need to do on the button side?


    ------------------------------
    Peter Gacek
    ------------------------------



  • 11.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 14:49
    An email Notification can be triggered  by a change to any field that you specify, so if you like you can just make a checkbox field and trigger off that.

    But if you want a button which would work in View mode, then you can create a Date / Time field  and gthern create a formula URL field with the following syntax

    var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

    var text TriggerEmail = URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
    & "&apptoken=xxxxxxxxxxx" //paste you app token here
    & "&_fid_99=now"; // this assumes  that your date / time field used to trigger the email if field ID 99, so edit the 99

    $TriggerEmail
    & "&rdr=" & URLEncode($RefreshPage)


    Applications Tokens are set in the Advanced Properties of the app.  You may just want to turn them off and skip that line of code.

    Formula above does not work then please post your formula and the error message back to the forum.


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 12.  RE: How to Add an Email/Save Button To a Form

    Posted 06-02-2021 16:14
    Looks like my coworker is fine with the secondary form popping up for the email, but I am still getting the:

    Cannot email an invalid quote!
    You cannot email this quote. Please select a valid quote and try again.

    If I'm trying to send an email for a quote that is not attached to an opportunity. If it's attached to an opportunity on its own, it'll send fine but I want to create this same button for another app that has no opportunity to connect to and I imagine I'll run into similar issues.

    ------------------------------
    Peter Gacek
    ------------------------------



  • 13.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 09:00
    Still struggling this morning, seemingly with a bunch off issues now but if I go to a quote request I did previously and try to email it, it works fine and emails.

    If I try to email a quote request I'm working on, it gives me the "Cannot email an invalid quote". Similarly if I try to make a quote request without it being attached to an opportunity, it gives me the same error.

    ------------------------------
    Peter Gacek
    ------------------------------



  • 14.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 09:24
    Can you post a screen shot of that message.  I have never experienced that message.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 15.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 09:29
    Absolutely,


    It's pretty strange. For both application where I'm trying to use the button, if I go to an old existing quote request or Job Inspection form, it allows me to edit/email no problem BUT if it's a new quote request or JIF it gives me this invalid error.

    ------------------------------
    Peter Gacek
    ------------------------------



  • 16.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 09:33
    I think you will have to have someone have a look at your app. This might need a support ticket to the care team.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 17.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 15:56
    Thanks Mark,

    I submitted a support ticket. One question about our previous formula, would I be able to alter it to a User - List instead of User to have it sent to multiple email accounts? It won't let me populate the formula for the User List I created into the UserToEmail portion of the formula.

    Here's what we had previously where [Send quote to:] is my user field:

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#]
    & "&tolist=" & List (",", UserToEmail([Send quote to:]), UserToEmail([Last Modified By]))

    ------------------------------
    Peter Gacek
    ------------------------------



  • 18.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 18:59
    UserListToEmails

    try this

    var text MyUserList = ToUserList([My userlist field goes here], ToUserList([Last Modified by]));  

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Record ID#]
    & "&tolist=" & UserListToEmails($MyUserList)


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 19.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 20:21
    Mark,

    I'm thinking his error message is due to the fact that when it's a new entry, there is no record ID, and so when he uses the GenEMailRecord, it has nothing to grab. Possibly?

    He could use rich text field and do the new savebeforenavigating, with the %%rid%%.....?

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 20.  RE: How to Add an Email/Save Button To a Form

    Posted 06-03-2021 20:23
    Peter,
     
    You should set that button to only show in Edit or view mode on the form, but not Add mode.  It will not work if you have not saved the record.

    The record does not exists if you have never saved it.  So you cannot email a record which does not exists.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 21.  RE: How to Add an Email/Save Button To a Form

    Posted 06-04-2021 10:02
    Thanks Mike/Mark, so if the quote is attached to an opportunity it works because it has a record ID associated with it already? 

    I'll work on hiding the button to show in edit/view and hope that satisfies my co-workers.

    ------------------------------
    Peter Gacek
    ------------------------------



  • 22.  RE: How to Add an Email/Save Button To a Form

    Posted 06-08-2021 11:24
    Edited by Peter Gacek 06-15-2021 09:43
    Hey @Michael Tamoush,

    Instead of the user having to press the save & continue or save & close button before being able to email the form, would I be able to integrate something into my button formula so it can save and then trigger the email action?

    I'd likely still keep the button to only show in edit or view mode but curious if it were possible otherwise as you had mentioned it previously. Here's my current code:

    var UserList MyUserList = ToUserList([Send form to:], ToUserList([Last Modified By]));

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Job site inspection form ID#]
    & "&tolist=" & UserListToEmails($MyUserList)

    Thanks,

    ------------------------------
    Peter Gacek
    ------------------------------



  • 23.  RE: How to Add an Email/Save Button To a Form

    Posted 06-21-2021 12:08
    Hey @Mark Shnier (Your Quickbase Coach),

    ​Wondering if you possibly had input on this as I just started looking at things again and still haven't been able to make things work but I feel like I'm overthinking it. I'm wondering if I can also have my email button automatically save the form before triggering the email when clicked.

    Here's the current formula:

    var UserList MyUserList = ToUserList([Send form to:], ToUserList([Last Modified By]));

    URLRoot() & "db/" & Dbid() & "?a=GenEmailRecord&rid=" & [Job site inspection form ID#]
    & "&tolist=" & UserListToEmails($MyUserList

    Thanks again for all your help previously, 


    ------------------------------
    Peter Gacek
    ------------------------------



  • 24.  RE: How to Add an Email/Save Button To a Form

    Posted 06-21-2021 12:15
    I suggest that you have the user save the record and put the button to email on the form but set to only show in view mode. The other choice is to not use that type of emailing and instead create what is called an email notification. Are you familiar with email notifications?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 25.  RE: How to Add an Email/Save Button To a Form

    Posted 06-21-2021 12:29
    Hey Mark,

    Thank you for responding, I actually currently have it so the email button only shows in view/edit mode.

    I've gone the notification route as well but it wasn't the preferred method per my co-worker's input though I may circle back to it. I was just hoping there might be some sort of onClick event I could slip into my formula but if it's not really possible then I'll stick with just hiding the buttons in add mode.

    Thanks again for your help

    ------------------------------
    Peter Gacek
    ------------------------------



  • 26.  RE: How to Add an Email/Save Button To a Form

    Posted 04-20-2022 17:12

    I have a similar issue to this one, and am in need of assistance. 

    QuickBase doesn't seem to have much, if any, documentation on GenEmailRecord. 

    This is my formula, and it works: 
    URLRoot() & "db/bi9wyxbah" & "?a=GenEmailRecord&rid=" & [Related Schedule]
    & "&tolist='email addresses'"

    However, I would also like to pre-populate the subject. I've tried:
    "&subject='value'"
    "&personalsubject='value'"
    "&emailsubj='value"
    "&emailquerysuj='value'"
    "&emailsubject='value'"

    I tried to look at the page source for sending an email, with no dice. I poured through everything I can. 



    ------------------------------
    Dwight Munson
    ------------------------------



  • 27.  RE: How to Add an Email/Save Button To a Form

    Posted 04-20-2022 17:19
    @Dwight Munson  It's hard to prove a negative, but the only parameters I know to work is for the to box,  and &dfid to set the form ID.​

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------