Forum Discussion
ChrisFaye1
5 years agoQrew Cadet
Thank You, Mark!
To confirm, this will copy any fields that would normally copy based on the basic 'copy unit' QB option, correct?
Also, trying to throw it in an edit record sequence, would adding it to something like this work - either before or after the edit record?
var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_2044=" & URLEncode(UserToName(User()))
& "&_fid_2046=true"
& "&_fid_627=false"
& "&apptoken=******";
var text URL =
"javascript:" &
"$.get('" &
$URLONE &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);";
If([Primary Unit]=false,
"<a class='Vibrant Danger'>Archived</a>",
"<a class='Vibrant Primary' style='border:1px solid #6BBD57; background-color:#47368B'" & "a href=" & $URL & ">Archive Record</a>")
------------------------------
Chris
------------------------------
To confirm, this will copy any fields that would normally copy based on the basic 'copy unit' QB option, correct?
Also, trying to throw it in an edit record sequence, would adding it to something like this work - either before or after the edit record?
var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_2044=" & URLEncode(UserToName(User()))
& "&_fid_2046=true"
& "&_fid_627=false"
& "&apptoken=******";
var text URL =
"javascript:" &
"$.get('" &
$URLONE &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);";
If([Primary Unit]=false,
"<a class='Vibrant Danger'>Archived</a>",
"<a class='Vibrant Primary' style='border:1px solid #6BBD57; background-color:#47368B'" & "a href=" & $URL & ">Archive Record</a>")
------------------------------
Chris
------------------------------
MarkShnier__You
Qrew Legend
5 years agoSorry this looks like a whole new question so I don't really understand if this is a new question or a follow on to your old question. If it's a new question please post a complete new question.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
- ChrisFaye15 years agoQrew CadetHi Mark!
Not a new question, just wondering how I would insert the GenCopyRecord action into the following rich text formula. Would it be smarter to add before or after the editRecord action?
------------------------------
Chris
------------------------------- JimHarrison5 years agoQrew ChampionHi Chris,
This looks like it could be an order of operations problem. If the record to be edited is the one that was just copied, the record that was just copied doesn't have a record id until it is saved so it can't be edited.
Instead consider the order of operations:
copy the record
save the record
edit the record - this can be triggered by a Webhook, when a record is added
------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------- ChrisFaye15 years agoQrew CadetThank You, Jim!
The ultimate goal would be to click the button which then edits the current record, saves it and then copies the record and saves that as well. (We're basically using the button to upgrade an old record, archive it and copy the record to be used as the 'current' record.)
I think this order makes sense since we're looking to update the old record first and then make a copy, yeah?
------------------------------
Chris
------------------------------