Forum Discussion
PeterGacek
4 years agoQrew Cadet
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
------------------------------
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
------------------------------
MarkShnier__You
Qrew Legend
4 years agore: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
------------------------------
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
------------------------------
- MichaelTamoush4 years agoQrew CaptainMark,
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
------------------------------ - MarkShnier__You4 years ago
Qrew Legend
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
------------------------------ - PeterGacek4 years agoQrew CadetHey @Mike 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
------------------------------ - MarkShnier__You4 years ago
Qrew Legend
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
------------------------------ - PeterGacek4 years agoQrew Cadet
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
------------------------------ - MarkShnier__You4 years ago
Qrew Legend
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
------------------------------ - PeterGacek4 years agoQrew CadetLooks 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
------------------------------ - PeterGacek4 years agoQrew CadetStill 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
------------------------------ - MarkShnier__You4 years ago
Qrew Legend
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
------------------------------ - PeterGacek4 years agoQrew CadetAbsolutely,
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
------------------------------ - MarkShnier__You4 years ago
Qrew Legend
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
------------------------------ - PeterGacek4 years agoQrew CadetThanks 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
------------------------------ - MarkShnier__You4 years ago
Qrew Legend
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
------------------------------ - PeterGacek4 years agoQrew CadetThanks 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
------------------------------ - PeterGacek4 years agoQrew CadetHey @Mark Shnier (YQC),
​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
------------------------------ - PeterGacek4 years agoQrew CadetHey 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
------------------------------