Forum Discussion
FrancescoSpiga1
4 years agoQrew Cadet
Sounds like you just need a simple API_EditRecord.
Also, you need to activate the "log entries" option on the property of the field so it would keep track of who/when as well.
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=apptoken" &
"&_fid_id=Completed" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &"?a=dr&rid=" & [Record ID#])
Replace the the values in bold with 1) app token 2) field id of your notes field
Hope this helps.
------------------------------
Francesco Spiga
------------------------------
Also, you need to activate the "log entries" option on the property of the field so it would keep track of who/when as well.
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=apptoken" &
"&_fid_id=Completed" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &"?a=dr&rid=" & [Record ID#])
Replace the the values in bold with 1) app token 2) field id of your notes field
Hope this helps.
------------------------------
Francesco Spiga
------------------------------
AnthonyWong1
4 years agoQrew Member
Hello,
Thank you for your swift response!
I added the URL and changed app token to : Called
and the ID to 10 since my multi text field is in slot 10 of the table.
It's still giving me an error message. Am I missing something or mistaken an action step?
Thank you again for the support.
------------------------------
Anthony Wong
------------------------------
- AhuvaBrown4 years agoQrew CadetCan you post your url and error message?
------------------------------
Ahuva Brown
------------------------------- AnthonyWong14 years agoQrew Member
Hello,
Here is the error message:Please note, Field ID 9 is no longer customer address. It's a multi text field called Contact Log.
This XML file does not appear to have any style information associated with it. The document tree is shown below.<qdbapi><action>API_EditRecord</action><errcode>34</errcode><errtext>You cannot change the value of this field</errtext><errdetail>The field named "Customer - Address" with field id 9 cannot be modified</errdetail><rid>111</rid><num_fields_changed>0</num_fields_changed><update_id/></qdbapi>
----------------------------------------------
Here's the URL I put for the button:
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=Called Customer" &
"&_fid_9=Completed" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &"?a=dr&rid=" & [Record ID#])
Thank You again for the support
------------------------------
Anthony Wong
------------------------------ - AnthonyWong14 years agoQrew MemberI also tried your link, but it wouldn't allow me to complete it due to the colon and a few other items I tried switching it out with. Here's a screenshot for your reference Ahuva.
Thank You again for your help.
------------------------------
Anthony Wong
------------------------------- AhuvaBrown4 years agoQrew CadetHi Anthony,
Regarding the error message you received, it looks like the field you're trying to update (field ID 9) is not an editable field. Is it a formula field or a lookup field from another table? If so, it cannot be updated. To update a field with 'completed', it would need to be a regular text field.
Is this the url you're using?
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=Called Customer" &
"&_fid_9=Completed" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &"?a=dr&rid=" & [Record ID#])
(the sample I gave you was just a condensed version of that with fake data, so you can disregard it and use this one)
The only problem I see with the url is that apptoken should be a long string of numbers and letters (for example: f4d85hg3dh693hf9dg6), and not 'called customer'. You can retrieve an apptoken by going to:
app settings -> app properties -> security options -> manage application tokens. If there are no application tokens yet, you can create a new one there and copy/paste it to the url. Is there another field you're trying to update with the value 'called customer'?
Aside from that, your url looks fine, so you just need to address the issue with field 9.
------------------------------
Ahuva Brown
------------------------------