Hi John:
QuickBase is migrating away from allowing NEW use of javascript in buttons.
You might try excluding the javascript portion and go right to the dbpage. In essence you would be trimming off the portion that opens in a new window.
You'd be removing this off the front:
"javascript:void(window.open('" &
and remove this on the end:
& "','copyRecursive','top=240,left=320,width=400,height=150,location=no,menubar=no,toolbar=no'))"
Leaving you with:
URLRoot() &"db/" & Dbid() & "?a=dbpage&dbid=" & [_DBID_STAGING_TYPE]
& "&pagename=copyParentChild-Select.html&onlyDBIDs=Table1.Table2.Table3&rid=" & URLEncode([Project Staging Type - Record ID#])
&"&dest=refresh&destrid=null&Table1-43=" & URLEncode([Staging ID]) & "&Table2-32=" & URLEncode([Staging ID]) & "&Table3-32=" & URLEncode([Staging ID])
& "&Table1-45=" & URLEncode(Today())
& "&Table1-44=" & URLEncode([Related Job])
& "&Table2-35=" & URLEncode(Today())
& "&Table2-33=" & URLEncode([Related Job])
& "&Table3-34=" & URLEncode(Today())
& "&Table3-32=" & URLEncode([Staging ID])
I have done this with a number of other buttons to avoid the javascript warning/inhibition. I don't have your environment to test but you should be able to go directly to the page.
------------------------------
Kirk Trachy , Senior Solutions Consultant
QuickBase | 603-674-5454 M |
ktrachy@quickbase.com------------------------------
Original Message:
Sent: 03-04-2021 11:32
From: John Ross
Subject: Shining light on the copyParentChild-Select function
Can anyone shine any light on the copyParentChild-Select function? We have a URL button in a legacy application that I am trying to re-create in a new application. For the life of me I cannot get it to work in the new application even those the structure and usage is the same. (The old one works fine, and has for many many years.)
Specifically, the main part of the code looks like this: (Note that I edited the table codes to table 1, 2, etc, for ease of readability)
"javascript:void(window.open('" & URLRoot() &"db/" & Dbid() & "?a=dbpage&dbid=" & [_DBID_STAGING_TYPE]& "&pagename=copyParentChild-Select.html&onlyDBIDs=Table1.Table2.Table3&rid=" & URLEncode([Project Staging Type - Record ID#])&"&dest=refresh&destrid=null&Table1-43=" & URLEncode([Staging ID]) & "&Table2-32=" & URLEncode([Staging ID]) & "&Table3-32=" & URLEncode([Staging ID])& "&Table1-45=" & URLEncode(Today())& "&Table1-44=" & URLEncode([Related Job])& "&Table2-35=" & URLEncode(Today())& "&Table2-33=" & URLEncode([Related Job])& "&Table3-34=" & URLEncode(Today())& "&Table3-32=" & URLEncode([Staging ID])& "','copyRecursive','top=240,left=320,width=400,height=150,location=no,menubar=no,toolbar=no'))"
Thanks guys and gals
------------------------------
John Ross
------------------------------