Has anyone used the new feature that allows you to grab the record ID from a custom Rich Text button on an add record form? Ive used it once successfully, and now am completely stuck on why i cant get it to work again.
In my code below I am trying to pass the new record ID to field 57 in my addcontract variable. (57 is a numeric field). But instead of the new RID it inserts 'id'. I've tried wrapping with URLEncode, no luck. Thoughts?
var text AddContract = URLRoot() & "db/" & "brgdpr9fn?a=API_GenAddRecordForm"
& "&_fid_12=" & URLEncode ([Related Vendor])
& "&_fid_57=" & "%%rid%%";
var text EditUserFocus =
URLRoot() & "db/" & "bp8yr9i5s?a=API_EditRecord" &
"&key=" & UserToEmail(User()) &
"&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxx" &
"&_fid_220=" & [Service Order - SO #] &
"&_fid_224=" & [Related Service Order];
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
& $EditUserFocus
& "&rdr=" & URLEncode($AddContract)
& "'>Add Subcontract</a>"
------------------------------
Mike Tamoush
------------------------------