I ran across this interesting post from the forums earlier this week from a user who is trying to use the iFrame SugarField type in his module. While it’s very easy to pull in fields from the current record, there really isn’t a way to pull another field in as a parameter to the URL, such as the current user’s id.
Since the SugarFields framework is very extensible and customizable, this is a very simple fix to add a new parameter to the array. All that’s needed to change a template is to drop it into the same location in the custom/ directory, so just copy the include/SugarFields/Fields/Iframe/DetailView.tpl template to custom/include/SugarFields/Fields/Iframe/DetailView.tpl and make the changes noted in code below ( example based upon 6.2.0beta ).
The key here is that we do a last minute string replace to change out the placeholder [current_user_id] for the actual id of the current user. You could use this same pattern to have any other parameters in the URL handled that aren’t part of the module fields themselves.