I have a grid linked to a form. I have the insert button enabled on the link and the form buttons on the grid toolbar enabled. It works like it’s supposed to first time around. I start on the grid app, then I click “Add New” I’m then redirected to the form. After inserting a record I’m passing a variable (starting in the initial grid to the form) to a control app. The control app has 2 created buttons, Yes and No. The Yes button is of type link to another form and works fine.
The No button was where I’m having my problem. I’ve tried it as type link and type php. With the link I link it back to the original grid I started on with no parameters. All is well until I click the “Add New” button again on the grid. Instead of going to the form like it did to begin with, it goes backwards to the control app I just redirected from. I then tried type php and put sc_redir(appname) with no parameters in the event but the same behavior occurs.
I figured since “Add New” was a hard coded button by SC included in the “Form Buttons” (which you can’t choose, hide, or rename any buttons that may be in “Form Buttons”) that it couldn’t possibly be coded to anything other than insert record. Funny thing is the back button is on my grid too. I’m wondering if the variables from the control are still being passed back to the grid even though I have no parameters in the link, but when it goes backwards the field I had showing the passed variable is now blank. I can click no again and go back to the form but when I click “Add New” again it goes back again. It’s stuck in a loop and I have to run the initial grid app again from the menu. I’ve been pulling my hair out all day on this and I have no idea where the problem is. Anyone have a clue?
Update:
When I run all this outside of a menu/security and manually input the variables in the initial grid everything redirects and passes the variables correctly with no problems. What is it that running it from a treemenu causes the redirects to act strangely?