Udaya_ThejaVenk
5 years agoQrew Member
Save the record and call the edit record API
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
------------------------------
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
------------------------------