I have tab setup on my screen with 4 tabs. On the first tab I have a portal and all is working fine. On tab 3 I have another portal but when I click on my button I have to add new portal record, it takes me back to the portal on the first tab first field, it does make a record there , it makes the record in the correct place. It is just annoying having to click on tab 3 again to add the data. Have I done something wrong. I thought it might be tab order so I have taken all tab numbers out. Here is the script for the add record to portal.
Any help is appreciated