Forum Discussion

KyleConner's avatar
KyleConner
Qrew Member
2 years ago

Formula URL Button - update child record and parent record with user input from codepage

I am trying to use a formula url button to mark a task complete, but in doing do, i also want to update the parent record of the task based on a user input from a codepage.  Both functions work independently, but I cannot get them to work together.  I think the issue is either somewhere in my nested url's, or it isnt possible to do this with a codepage for user input.

Is what I am trying to do possible?

Here is what I have:

var text URLONE = URLRoot() & "db/" & [_DBID_SO_TASKS]
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_12=" & URLEncode("Complete")
& "&apptoken=dg3xmifbwc8n9adx8a9hfkdqq7u&rid=";

var text URLTWO = URLRoot() & "db/" & [_DBID_OPPORTUNITY]
& "?a=API_EditRecord&apptoken=dg3xmifbwc8n9adx8a9hfkdqq7u"
& "&rid=" & [Related Opportunity]
& "&_fid_14=";

var text urlprompt = URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=8"
& "&url=" & URLEncode($urltwo);

var text URLTHREE = URLRoot() & "db/" & AppID();

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

If I change the last three lines to just $URLONE, or $URLprompt they work independently, but I want to trigger everything to happen form one click.  thank you in advance.


------------------------------
Kyle Conner
------------------------------

2 Replies

  • Hi;
    I think you should put redirects(that needs to come after code page call) in code page as last step/function.
    Thanks

    ------------------------------
    Razi D.
    Desta Tech LLC
    razi@destatechs.com
    ------------------------------
    • KyleConner's avatar
      KyleConner
      Qrew Member
      Thank you for the comment, I was able to get it to work by removing the

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

      at the end and getting rid of variable URLTHREE.

      ------------------------------
      Kyle Conner
      ------------------------------