Discussions

 View Only

Add Field to end of customRedirectURL Code Page

  • 1.  Add Field to end of customRedirectURL Code Page

    Posted 4 days ago
    I was wondering if it was possible in the customRedirectURL to add a different field (and it's value) at the end of the URL.  For example, in my code below, the record ID is what is populated at the end of the URL: (xxxxxxxxx is just a placeholder)

    console.log(req1);
    //******ADD YOUR DBID
    $.ajax({url: "xxxxxxxxx?act=API_AddRecord",
    type: 'POST',
    data: req1,
    contentType: "text/xml",
    dataType: "xml",
    processData: false,
    success: function(data, status, xhr) {

    var _rid = $(data).find('rid');
    var rid = _rid[0].innerHTML;
    var customRedirectURL = "https://xxxxxxx-xxxxxxx.quickbase.com/db/xxxxxxxxx?a=dbpage&pageID=2" + "&rid=" + rid;
    console.log(customRedirectURL);
    window.location.href = customRedirectURL;
    }
    });
    }

    instead of +rid can i use another field from the table there (field that is set by a variable)?  This does have to be in a code page and not in a URL formula field or form button, etc.  Thanks so much!

    ------------------------------
    Lija Harris
    ------------------------------