Page 1 of 2

Edit existing record /permalink

Posted: Tue Dec 19, 2017 3:05 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:
http://forums.nubuilder.cloud/viewtopic.p ... al+#p14966

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

Re: Edit existing record /permalink

Posted: Sun Jan 07, 2018 9:13 pm
by admin
toms,

Leave it with me.

I have an idea...

Steven

Re: Edit existing record /permalink

Posted: Mon Jan 08, 2018 7:12 am
by toms
Great, I'm looking forward to it!

Re: Edit existing record /permalink

Posted: Mon Jan 08, 2018 7:23 pm
by admin

Re: Edit existing record /permalink

Posted: Tue Jan 09, 2018 6:10 am
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

Posted: Tue Jan 09, 2018 1:48 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

Posted: Tue Jan 09, 2018 3:15 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

Posted: Tue Jan 09, 2018 3:19 pm
by admin
toms,

I don't understand what you mean.

Steven

Re: Edit existing record /permalink

Posted: Wed Jan 10, 2018 10:44 am
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

Posted: Wed Jan 10, 2018 7:51 pm
by admin