Forum Discussion
For this line here
var text AddUser = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_45=" & URLEncode("Task OnHold"); // Parent table
you are telling it to edit a record, but you have not specified, which record to edit. So it needs a &rid= parameter, maybe like
"&rid=" & [related parent]
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
As Discussed, Updated the formula. Now Child table date is update but Parent table Status is not updating and API button is not disabled in the child table
var text EditChildRecord = URLRoot() & "db/" & [_DBID_ON_HOLD_TASKS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&rid=" & [Record ID#] & "&_fid_6=" & Now();
var text EditParentRecord = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_45=" & URLEncode("Task OnHold")
& "&rid=" & [Record ID#];
If(IsNull([On Hold Start Date]),
$EditChildRecord & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_ON_HOLD_TASKS] & "?a=dr&rid=" & [Record ID#]),
$EditParentRecord & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_INPROGRESS] & "?a=dr&rid=" & [Record ID#]))
------------------------------
manohar vankireddy
------------------------------
- MarkShnier__You2 years agoQrew Legend
The problem is here
var text EditParentRecord = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_45=" & URLEncode("Task OnHold")
& "&rid=" & [Record ID#];your button is on the child record. Therefore the record ID that you are trying to edit on the parent record is not the record ID of the child but rather the record ID of the parent record
That Line needs to read something like this.
& "&rid=" & [Related Parent];
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- manoharvankired2 years agoQrew Trainee
Hi Mark,
var text EditParentRecord = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_45=" & URLEncode("Task OnHold")
& "&rid=" & "3";I'm getting error like this "<errdetail>Sorry, there is no record in this application table with the record identifier (rid) of "3".</errdetail>"
------------------------------
manohar vankireddy
------------------------------- MarkShnier__You2 years agoQrew Legend
Well I guess I have to ask. Do you in fact have a parent record where the Record ID is 3?
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------