I ran across this post from 3 years ago when trying to update my parent record (Products)from a URL Button on a child record (Inventory Adjustments.)
This was the original question:
I have searched and have not quite found the answer I am looking for... I have 2 Tables, Table 1 is Store Contact (Parent) and Table 2 is Calls (Child) In Store Contact Table 1, I have to look-up fields: Store MGR Name & Store MGR Email
· When a new record is added in Calls, I have the following: The Store Manager Name and Email that is pulled from the Store Contact Table. The problem is when the Manager changes I want the user to be able to use a check box to initiate the Update Name and Email (hidden before box is checked). Then when the user saves the record I would like for the updated name and email address to update the parent record in the Store Contact Table. How do I go about doing this?
This was the answer posted by Mark:
I don't know of a way to do this "on save", but you can make a URL formula field to be pushed by the user to push up the data from a child to a parent. The button would need only be visible in view mode to be sure that the data is saved before you push the button.
This could create a problem, because you may have the add Call button set to return to the Parent Store record after saving.
But the the formula is going to look something like this
URLRoot() & "db/" & [_DBID_ORDER__NOTES]
& "?act=API_EditRecord&rid=" & [Related Store #]
& "&_fid_11=" & [Order #]
& "&_fid_6=" & URLEncode("email triggered to Customer Service with the Note above")
& "&_fid_8=" & URLEncode([Rep Name])
& "&_fid_9=" & URLEncode([Acct Name])
You would need to put in your dbid for your parent table, and the fid's from the parent, but the value fields from the child.
Here's my new question:
I applied the above answer to my current URL button and it looks like this:
URLRoot() & "db/" & [_DBID_PRODUCTS]
& "?act=API_EditRecord&rid=" & [Item Code]
& "&_fid_204=" & URLEncode([New NS Item Code])
This works and updates the parent record as desired however I still receive the following error message.<qdbapi> <action>API_EditRecord</action> <errcode>0</errcode> <errtext>No error</errtext> <rid>87</rid> <num_fields_changed>1</num_fields_changed> <update_id>1434001822957</update_id> </qdbapi>
What did I leave out of my formula that is making this error appear? Like I said before, the parent record is updating like I need it to. I'd just like to eliminate the error message.