Forum Discussion
IvanWeiss
Qrew Captain
It is actually the default add buttons for child tables. Here is one of them but there are a bunch. All same general format:
URLRoot() & "db/" & [_DBID_COMMUNICATION_PLAN] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Project Number])& "&z=" & Rurl()
------------------------------
Ivan Weiss
------------------------------
URLRoot() & "db/" & [_DBID_COMMUNICATION_PLAN] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Project Number])& "&z=" & Rurl()
------------------------------
Ivan Weiss
------------------------------
MarkShnier__You
3 years agoQrew Legend
OK, so I am interpreting that this is your question.
You have a parent table and it has a two forms. You launch and Add Child button off a Parent record and you want to make sure that when the child record is saved that you land the user in display mode on the specified form that you want.
I do not know of any way to actually detect what form the user is launching off of but I guess since you have different forms you can have different buttons for add child.
The syntax here should return the user to form number 10 on the parent record.
var text AddChild = URLRoot() & "db/" & [_DBID_COMMUNICATION_PLAN] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Project Number]);
var text ReturnToFormTen = URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & [Record ID#];
$AddChild
& "&NextURL=" & URLEncode($ReturnToFormTen)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
You have a parent table and it has a two forms. You launch and Add Child button off a Parent record and you want to make sure that when the child record is saved that you land the user in display mode on the specified form that you want.
I do not know of any way to actually detect what form the user is launching off of but I guess since you have different forms you can have different buttons for add child.
The syntax here should return the user to form number 10 on the parent record.
var text AddChild = URLRoot() & "db/" & [_DBID_COMMUNICATION_PLAN] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Project Number]);
var text ReturnToFormTen = URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & [Record ID#];
$AddChild
& "&NextURL=" & URLEncode($ReturnToFormTen)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
- MikeTamoush3 years agoQrew CommanderMark, will the relatively new return function work for this case?
& "&rdr="
& URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())
------------------------------
Mike Tamoush
------------------------------- StevenShweky3 years agoQrew Trainee
- MarkShnier__You3 years agoQrew Legend@Mike Tamoush I did a test and in fact it works very nicely. This code will return the user (after saving the child) to the original form whether it be the main form, say form #2 or an alternative form like form 10 or a report. So it remembers where the user launched form.
var text AddChild = URLRoot() & "db/" & [_DBID_CHILD] & "?a=nwr&_fid_7=" & URLEncode ([Record ID#]);
var text ReturnToOriginalLaunchPoint = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$AddChild
& "&NextURL=" & URLEncode($ReturnToOriginalLaunchPoint)
------------------------------
Steven Shweky
------------------------------