XML Error Following URL Formula Record Additions

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Hi there!  I have a URL formula that creates three records from a master record.  When I click the button it creates all three records accurately but returns this XML error.  I would prefer a clean return back to the master record.  Any help you can offer is appreciated!!!

URL FORMULA

var text URLONE = URLRoot() & "db/XXXX?a=API_AddRecord" &
"&apptoken=XXXX"&
"&_fid_6=" & [Deliverable Type]&
"&_fid_7=" & [Deliverable 1 Due Date]&
"&_fid_14=" & [Client/Plan Level]&
"&_fid_9=" & [Related Plan];

var text URLTWO = URLRoot() & "db/XXXX?a=API_AddRecord" &
"&apptoken=XXXX"&
"&_fid_6=" & [Deliverable Type]&
"&_fid_7=" & [Deliverable 2 Due Date]&
"&_fid_14=" & [Client/Plan Level]&
"&_fid_9=" & [Related Plan];

var text URLTHREE = URLRoot() & "db/xxxx?a=API_AddRecord" &
"&apptoken=xxxx"&
"&_fid_6=" & [Deliverable Type]&
"&_fid_7=" & [Deliverable 3 Due Date]&
"&_fid_14=" & [Client/Plan Level]&
"&_fid_9=" & [Related Plan];

$URLONE
& "&rdr=" & URLEncode($URLTWO)
& URLEncode("&rdr=" & URLEncode($URLTHREE))

XML API ERROR

<?xml version="1.0"?>

<qdbapi>

<action>API_AddRecord</action>

<errcode>0</errcode>

<errtext>No error</errtext>

<rid>28</rid>

<update_id>1445460435948</update_id>

</qdbapi>

Photo of Karen

Karen

  • 0 Points

Posted 4 years ago

  • 0
  • 1
When you do edits, you need to either refresh back to a record or a report to suppress that XML success message.

var text URLFOUR = URLRoot() & "db" & dbid() & "?a=dr&rid=" & totext([Record ID#]); 






$URLONE

& "&rdr=" & URLEncode($URLTWO)

& URLEncode("&rdr=" & URLEncode($URLTHREE))

& URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))







Photo of Karen

Karen

  • 0 Points
This worked like a charm!  Had to add in one forward slash "db/" & dbid(), but otherwise a great way to add multiple records at once.
Good debugging. Glad you got it working.