Not necessarily. There is a new functionality to deal with that. I haven't played around with it a lot, but here are my notes on it:
Use record ID# as a parameter when you click a custom hyperlink from an add record form. This lets you leverage newly created record IDs and expands custom code page workflow options. Use record ID# in formulas with data-replaceRid=true and %%rid%% where you would like the RID.
Note: You can only use this parameter when the hyperlink navigates to the same tab, not when it is set to open in a new tab or popup.
Here's an example of a formula-rich text field that uses this feature:
var text rid =
If([Record ID#]>0,
ToText([Record ID#]), // Record ID already exists
"%%rid%%" // New record, no Record ID exists yet
)
;
var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;
------------------------------
Michael Tamoush
------------------------------
Original Message:
Sent: 09-28-2021 16:21
From: George Bramhall
Subject: Error in a URL Button
Ahhh, I was creating a new record. In all cases the record ID will have been created. Thanks!!!
------------------------------
George Bramhall
Original Message:
Sent: 09-28-2021 16:02
From: Michael Tamoush
Subject: Error in a URL Button
Does the record ID exist yet? ie - are you pushing the button when creating a new record, or has it been saved and the rid created?
------------------------------
Michael Tamoush
Original Message:
Sent: 09-28-2021 15:57
From: George Bramhall
Subject: Error in a URL Button
Ok, fixed that but still get the same error.
------------------------------
George Bramhall
Original Message:
Sent: 09-28-2021 15:50
From: Michael Tamoush
Subject: Error in a URL Button
You have "&rid=" & [Record ID#] & twice. Remove the second instance.
If((not([showcalledby]) or [Unclaim Lead]),
URLRoot() & "db/" & [_DBID_LEAD_NOTES] & "?a=API_EditRecord&rid=" & [Record ID#] &
"&rid=" & [Record ID#] & //REMOVE THIS LINE
"&_fid_39=" & URLEncode ([Current User]) &"&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))
------------------------------
Michael Tamoush
Original Message:
Sent: 09-28-2021 15:27
From: George Bramhall
Subject: Error in a URL Button
Any ideas why I am getting the followon error for this URL button:
I have the following code for a URL Button:
If((not([showcalledby]) or [Unclaim Lead]),
URLRoot() & "db/" & [_DBID_LEAD_NOTES] & "?a=API_EditRecord&rid=" & [Record ID#] &
"&rid=" & [Record ID#] &
"&_fid_39=" & URLEncode ([Current User]) &"&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))
but I am getting the following error:
<qdbapi>
<action>API_EditRecord</action>
<errcode>30</errcode>
<errtext>No such record</errtext>
<errdetail>Missing "rid" parameter.</errdetail>
</qdbapi>
------------------------------
George Bramhall
------------------------------