Page 1 of 2

Edit existing record /permalink

PostPosted: Tue Dec 19, 2017 11:35 am
by toms
My workflow looks like this:

1. A user creates a new request (record) in a form by filling in and saving the entry.
2. A PHP script sends an email to the requester, acknowledging that the request was received.
3. At the same time, an email is sent to the support team, notifying them of a new request that requires action.

Now I'd like to add a link to the email that re-opens that specific record. This allows the support team to edit the record without the need to search for it manually.

I have found a solution in this thread:
viewtopic.php?f=15&t=8796&p=14966&hilit=nuLoadEditGlobal+#p14966

Any chance to implement it in V4? This would ease things a lot.

Re: Edit existing record /permalink

PostPosted: Mon Jan 08, 2018 5:43 am
by admin
toms,

Leave it with me.

I have an idea...

Steven

Re: Edit existing record /permalink

PostPosted: Mon Jan 08, 2018 3:42 pm
by toms
Great, I'm looking forward to it!

Re: Edit existing record /permalink

PostPosted: Tue Jan 09, 2018 3:53 am
by admin

Re: Edit existing record /permalink

PostPosted: Tue Jan 09, 2018 2:40 pm
by toms
Steven,

Thank you so much for the rapid implementation! It works great so far, I just need to do some more testing.

The only drawback is - if that's what you want - that preceding breadcrumbs are not present, or at least there should be a way to go "back" to nuuserhome. (Maybe show a home breadcrumb)

For those who would like the permalink to show up in the browser's address bar, add this piece of javascript under
Home ► Setup ► Header

(That might be something not everyone wants and maybe if this is going to be integrated at all, it should be configurable.)

Code: Select all
function nuOnLoad(){
  if (window.top === window.self) {

    var f = nuCurrentProperties();
       if(window.location.search.indexOf('?i=')>=0)
      window.history.replaceState('',document.title,'?f=' + f.form_id+'&r='+ f.record_id);
       else
      window.history.pushState('',document.title,'?f=' + f.form_id+'&r=' + f.record_id);
   }
}

Re: Edit existing record /permalink

PostPosted: Tue Jan 09, 2018 10:18 pm
by admin
toms,

If anyone needs a breadcrumb (back to a place they didn't start) they will have to do it a different way than using these URL parameters.

Steven

Re: Edit existing record /permalink

PostPosted: Tue Jan 09, 2018 11:45 pm
by toms
How could this be achieved?

Adding a html link that points to https://xxx/nuBuilder4 won't help much since you'll get this nasty dialog box:

Re: Edit existing record /permalink

PostPosted: Tue Jan 09, 2018 11:49 pm
by admin
toms,

I don't understand what you mean.

Steven

Re: Edit existing record /permalink

PostPosted: Wed Jan 10, 2018 7:14 pm
by toms
Let me give you some more/precise details:

1) I open a record of a form using "Auto Login"-parameters: e.g. https://xxx/nuBuilder4/index.php?f=5a54 ... b944&r=142

2) Now I can edit and save the record (Picture "Edit a record")

3) If the user wants to go back to the home screen (Picture "nuhome"), there is no way (no home breadcrumb)
The only way is to hit "logout" and "login" again.

I'm wondering if there is a possibility to add a link (or breadcrumb) to go to "nuhome" without the need to logout and login again.

Re: Edit existing record /permalink

PostPosted: Thu Jan 11, 2018 4:21 am
by admin