Forum Discussion

BullseyeBullsey's avatar
BullseyeBullsey
Qrew Cadet
6 years ago

Add Record"" button redirecting after saving in mobile... when it's not supposed to?

When a user creates an order, they need to stay on that page to add another record related to an order.  This has always worked fine on the PC, but for some reason our mobile version has been returning people to the previous page after they save the order:

URLRoot() & "db/" & [_DBID_ORDERS] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Club Name])


It definitely does not have the & "&z=" & Rurl()  added to the end.  I'm not sure if there's any way to fix this by using a different link or form for mobile users?  I appreciate any help or insights.

5 Replies

  • You could try using the NextURL at the end of your formula such as:

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

    However, I have heard from others of odd behavior with their buttons on mobile, but it's worth a shot.

    -Sharon
    • BullseyeBullsey's avatar
      BullseyeBullsey
      Qrew Cadet
      Thanks Sharon.  Any way to find the record ID of the newly created record?
    • Quick_BaseJunki's avatar
      Quick_BaseJunki
      Qrew Captain
      I'm not sure what you mean by 'find'. The record ID will be at the top of the record unless you're using a different title. It will also be in the [Record ID#] field.
    • BullseyeBullsey's avatar
      BullseyeBullsey
      Qrew Cadet
      The formula you included sends me somewhere else, and I needed to have the new record ID to keep me on the new record I created.  I was able to play around with it a few hours ago, and managed to make it work on iPhone but not Android.

      URLRoot() & "db/" & [_DBID_ORDERS] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Club Name])& "&NextURL="  & URLEncode(URLRoot() & "db/" & [_DBID_ORDERS])& "a=dr&rid=API_DoQuery&RIDs=1&query={'1'.AF.Now()-Minutes(2)}AND{'5'.CT.User()}AND{'17'.CT.[Club Name])&clist=3\noptions=num-1"

      I'm very limited with URL coding, but that's what I have if anyone is looking up this issue.

      Thanks Sharon.