Skip to main content
Question

create a button that will trigger email notification

  • August 16, 2016
  • 0 replies
  • 278 views

Forum|alt.badge.img+7

I show the example below in an earlier post but I can't get it to work


URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "_fid_208=1"&"\n&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])

This topic has been closed for replies.

There seem to be some extra characters in the middle.  The \n does not belong and you were missing an &



URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] 

& "&_fid_208=1" 

& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])

Forum|alt.badge.img+7
  • Author
  • Registered
  • August 16, 2016
Do I need the apptoken?

Below is what I have and I am receiving an error message:

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=kn75dwb4y6nhrdtb89z2cnv9ay4" & [Record ID#] &"& _fid_208=1"&"&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])

I suggest that you go into Settings and then Application Properties and uncheck the box which requires application tokens.

Then i suggest that you review the formula which I posted and use it instead of your formula.  You formula is missing the &rid= part which tells the formula which record ID to update.

Forum|alt.badge.img+7
  • Author
  • Registered
  • August 16, 2016
The App token have to be required, so would I apply that right after the EditRecord& apptoken =???"

It would look like this with an app token

URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=kn75dwb4y6nhrdtb89z2cnv9ay4"
& "&_fid_208=1"
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])

Forum|alt.badge.img+7
  • Author
  • Registered
  • August 16, 2016
thanks I got it to work

thx for letting me know.  now, btw, after the button is pushed, then if it is pushed again, the email will not fire as the trigger field is already set to 1 (true).  If you want it to fire every time and you tell me what the name is of your trigger field that field ID 208, then I can help you with that.

Forum|alt.badge.img+7
  • Author
  • Registered
  • August 16, 2016
thanks you read my mind the field name is Send_Notification

var text NewToggle = IF([Send_Notification] = true, "0","1") // this will make the toggle be the opposite of its current value, but in text format.


URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=kn75dwb4y6nhrdtb89z2cnv9ay4"
& "&_fid_208=" & $NewToggle
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])

Forum|alt.badge.img+7
  • Author
  • Registered
  • August 16, 2016
Perfect you rock, thanks alot

What if I want to send out an entire report, like a report I'm subscribed to daily, but on demand at the click of a button. I suppose I could use the api but the report subscription is working like I like it I just may need it more than daily.

If you are the Admin, you can go to the Subscription setup page and click the button to send out a test Subscription.,  That basically forces out the Subscription at will.  It does take a few minutes to get though the queue and get processes.

If you want to make a URL formula button to force out a Subscription, you can mimic the URL that you see when you click that button.

URLRoot() & "db/" & [_DBID_TABLE_NAME_GOES_HERE] & "?a=SendSubscription&ID=XX"
Replace XX with the Subscription number you see in the URL when working with the Subscription.