Forum Discussion
MarkShnier__You
Qrew Legend
4 years ago&disprec=1 is not new.
It's a parameter that basically says when you get done adding the record then display the record equals true. In other words land the user on the record in View mode.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
It's a parameter that basically says when you get done adding the record then display the record equals true. In other words land the user on the record in View mode.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
MarkShnier__You
Qrew Legend
3 years agoJust x referencing to a solution.
https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=4466dd0f-403f-4f24-94d8-4ac7128081ae&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer#bm4466dd0f-403f-4f24-94d8-4ac7128081ae
Just posting some code that worked. The goal was to add a record and return the user to the added record in Edit mode.
var text RID = "%%rid%%";
var text AddShipment = URLRoot() & "db/" & Dbid() & "?a=nwr";
var text EditShipment = URLRoot() & "db/" & Dbid() & "?a=er&rid=" ;
var text URL =
$AddShipment
& "&rdr=" & URLEncode($EditShipment) & $RID;
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
& $URL
& "'>Save and Display in Edit Mode</a>"
NOTE: The %%RID%% does not seem to like being URLEncoded.
The use case might be to land the user on a saved record so that the Report Link fields would immediately populate.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=4466dd0f-403f-4f24-94d8-4ac7128081ae&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer#bm4466dd0f-403f-4f24-94d8-4ac7128081ae
Just posting some code that worked. The goal was to add a record and return the user to the added record in Edit mode.
var text RID = "%%rid%%";
var text AddShipment = URLRoot() & "db/" & Dbid() & "?a=nwr";
var text EditShipment = URLRoot() & "db/" & Dbid() & "?a=er&rid=" ;
var text URL =
$AddShipment
& "&rdr=" & URLEncode($EditShipment) & $RID;
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
& $URL
& "'>Save and Display in Edit Mode</a>"
NOTE: The %%RID%% does not seem to like being URLEncoded.
The use case might be to land the user on a saved record so that the Report Link fields would immediately populate.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
- MikeTamoush3 years agoQrew CommanderMark,
Did you ever figure out how to land in edit mode, if the add record is in a different table than the URL button?
& "&disprec=1"; This worked for me to land in view mode, even when adding a child. But I think the solution posted above will only work if you are adding a record to the table you are in, right? Not if you are adding a child?
------------------------------
Mike Tamoush
------------------------------- MarkShnier__You3 years ago
Qrew Legend
This should also work to add a child record and land in edit mode on the child.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- MikeTamoush3 years agoQrew CommanderThe posted code does not work for me. I don't think it is saving the new record before the redirect. Then it tries to redirect and says the record does not exist. I can see that it is putting in a blank for the RID.
I think it would work with NextURL (which defeats the purpose)? I wonder if it would work with API_AddRecord?
------------------------------
Mike Tamoush
------------------------------