Discussions

Expand all | Collapse all

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

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

    Posted 10-31-2018 17:52
    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.


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

    Posted 11-01-2018 22:04
    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


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

    Posted 11-07-2018 17:47
    Thanks Sharon.  Any way to find the record ID of the newly created record?


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

    Posted 11-07-2018 22:22
    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.


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

    Posted 11-07-2018 22:51
    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.


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

    Posted 11-07-2018 23:04
    Wow! I'm impressed that's a really creative way to find the last record created.

    Help me understand the relationship you have better. You wrote: "When a user creates an order, they need to stay on that page to add another record related to an order."

    From this, it sounds like Orders are the parent record, and you would like for users to stay on that record after they create a child record related to it. Is that right?

    Or are you saying you want them to 'save and keep working' on the child record?