Skip to main content
Question

Save the record and call the edit record API

  • June 17, 2020
  • 0 replies
  • 40 views

Hi All,

Please find the code below which i have used for saving a record and then call another function which edit record.
The fields which are modified using edit record API.

The code is working some time perfectly but not all times.

Please let me know if any idea why if there is any issue.


var text btnColor = "#ff0000";

var text UrlEdit = URLRoot() & "db/" & Dbid () & "?act=API_EditRecord" &"&rid=" & [Record ID#] & "&_fid_60=4" & "&_fid_78="&UserToName(User())& "&_fid_79="&UserToEmail(User())&"&rdr=" & URLEncode (URLRoot() & "db/" & Dbid () & "?a=dr&rid=" & [Record ID#] & "&rl=zpk");

"<a onclick=\"if($('#_fid_13').val()!='' ){$('#_fid_72').val($('#_fid_13').val());$('#_fid_13').val('');$('.saveBtn').trigger('click'); $(location).attr('href', '"&$UrlEdit&"')} else{alert('Please enter Comments');}\" style=\"background: "& $btnColor &";border: 1px solid #d6d6d6;border-radius: 5px;color:#ffffff;display: inline-block;padding: 10px;font-family: sans-serif;text-align: center;text-decoration: none;text-shadow: none; white-space: nowrap\" id=\"create_table\" class=\"Vibrant\">Reject</a>"

------------------------------
Uday
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
Try this change

var text UrlEdit = URLRoot() & "db/" & Dbid () & "?act=API_EditRecord"
&"&rid=" & [Record ID#]
& "&_fid_60=4"
& "&_fid_78="& URLEncode(UserToName(User()))
& "&_fid_79="& URLEncode(UserToEmail(User()))
&"&rdr="
 & URLEncode (URLRoot() & "db/" & Dbid () & "?a=dr&rid=" & [Record ID#] & "&rl=zpk");

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------