Skip to main content
Question

URL Button Doesn't Work in Edit Mode

  • February 28, 2022
  • 0 replies
  • 157 views

I've got a URL button "Submit" that creates a child record then redirects to the parent table. It works great, but I can't do it while in edit mode, which is really the place I need it. I want staff to be able to click "Submit" as they are entering data and not have to save it the record then click the button.

------------------------------
Bethany Hudson
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
Can you post your current code?  Is the advanced settings for your table set to save parent automatically

"Auto save when redirected away from the page"

Your workflow that you were sitting on a parent record editing the parent record and then clicking submit which is supposed to save the parent record and add a child record?  When they press submit where do you want to land the user?

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------

RaziD
Forum|alt.badge.img+3
  • Registered
  • February 28, 2022
Hi Bettany;
You can create formula rich text field and use that instead. Formula below is saving master table record then adding child record and returns back to master table record. I hope this helps

Parameters: fid=48 is related project in task table and fid=6 is task name field in Task table.

var text url=URLRoot() & "db/" & [_DBID_TASKS] & "?a=API_AddRecord&_fid_48="&[Record ID#]&"&_fid_6=test"&
"&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]);

"<a class='Vibrant Success SaveBeforeNavigating' style='background: #6BBD57; border: 1px solid #6BBD57' href='" &$url&"'>Add  Task Record</a>"

Thank you

------------------------------
Razi D.
Desta Tech LLC
razi@destatechs.com
------------------------------