Skip to main content
Question

API_GenAddRecordForm and save record

  • March 1, 2023
  • 0 replies
  • 260 views

I'm using API_GenAddRecordForm to copy existing record to new record. The form is displayed with the 'copied' data but until the new record is saved, there's no Record ID assigned.

I need a record id assigned for another step in the edit process.  

Any advice on how to copy the record, save the copied record, retrieve the copied record id and then edit the copied record? 



------------------------------
Cathy Wilbur
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

I will try answering rom the back of a van in Vietnam. Have WiFi, Will Travel.but only have ipad access now  

the SaveBeforeNavigating functionality should work for you. It only works as a Formula Rich Text field Type, not Formula URL. 


var text RID = "%%rid%%";

var text AddShipment = URLRoot() & "db/" & Dbid() & "?act=API_GenAddRecordForm ........
var text EditShipment = URLRoot() & "db/" & Dbid()

 & "?act=API_EditRecord"

& "&_fid_99=Unsubmitted"

& "&rid=";

var text DisplayShipment = Urlroot() & "db/" &  dbid() & "?a=dr&rid=";

var text URL =
$AddShipment
& "&rdr=" & URLEncode($EditShipment) & $RID

& URLEncode("&rdr=" & URLEncode($URLTHREE)) & $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</a>"

NOTE: The %%RID%% does not seem to like being URLEncoded.



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------