Forum Discussion
AhuvaBrown
4 years agoQrew Cadet
Have you tried using the EditRecord API?
Assuming the current contract record is already saved, you can use a formula query to retrieve the maximum record id of the contract table and insert it into the url like so:
var textlist listOfRids = GetFieldValues(GetRecords("{3.GTE.'1'}", "contract tableid"),3); - this query retrieves all contract record ids
var number listSize = Size($listOfRids); - this gets the size of the list
var text maxRid = Part(ToText($listOfRids), $listSize, ";"); - this captures the last record in the list, which is the max
var number rid = ToNumber($maxRid); - this converts it to a numeric value
Then,
URLRoot() & "db/" & contract tableid & "?a=API_EditRecord&rid=" & $rid & "&_fid_34=" & [Record ID#] & "&rdr=" & URLEncode(URL to land on after editing the record, otherwise you'll just see an xml response)
------------------------------
Ahuva Brown
------------------------------
Assuming the current contract record is already saved, you can use a formula query to retrieve the maximum record id of the contract table and insert it into the url like so:
var textlist listOfRids = GetFieldValues(GetRecords("{3.GTE.'1'}", "contract tableid"),3); - this query retrieves all contract record ids
var number listSize = Size($listOfRids); - this gets the size of the list
var text maxRid = Part(ToText($listOfRids), $listSize, ";"); - this captures the last record in the list, which is the max
var number rid = ToNumber($maxRid); - this converts it to a numeric value
Then,
URLRoot() & "db/" & contract tableid & "?a=API_EditRecord&rid=" & $rid & "&_fid_34=" & [Record ID#] & "&rdr=" & URLEncode(URL to land on after editing the record, otherwise you'll just see an xml response)
------------------------------
Ahuva Brown
------------------------------