Forum Discussion

Kelly-AnnTainto's avatar
Kelly-AnnTainto
Qrew Trainee
7 days ago

API Button to edit record then redirect to external webpage

 I have a button that was created to redirect the User to an external webpage that opens in a window that relates the quickbase record they are on.  There is a variable in the URL formula that switches out a placeholder in weblink with the related record id for the external webpage based on the QB record.  (Adding this piece of information in case that is my issue). 

This button as is works great.   However, I want to now use this button as a trigger to start a pipeline by checking a box on the current record in addition to redirecting to the external webpage.  I can get it to check the box but gives an error when trying to execute the next request to go the external site.    I've used various methods I've seen on the forum, but it keeps giving me an error.   Any help would be appreciated!    Below is my latest attempt: 

var text URL="https://XXXXXXXXXXXX";
var text mPower=SearchAndReplace($URL,"mPower",ToText([License - Related mPower Location]));


var text CheckFacilityNotify=URLRoot() & "db/" & [_DBID_RENEWALS_FEES]
& "?act=API_EditRecord"
& "&rid=" & URLEncode([Record ID#])
& "&_fid_184=true" 
& "&apptoken=xxxxxxxxxxxxxxxx";

$CheckFacilityNotify
& "&rdr=" & URLEncode($mpower)

Thank you,

Kelly 

    • Kelly-AnnTainto's avatar
      Kelly-AnnTainto
      Qrew Trainee

      Hi Mark,

      This is the error:

      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>0</errcode>

      <errtext>No error</errtext>

      <rid>2686</rid>

      <num_fields_changed>0</num_fields_changed>

      <update_id>1738772287027</update_id>

      </qdbapi>