Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
inline function and callout function
kalpana
callout function is used to interact with server while script is running in javascript. Whats the function of inline then ? I looked at the code and callout function is called by the inline function. whats the advantage of using inline function ? why shall I use callServer() instead of callout ?
Find more posts tagged with
Comments
vicious
Please read documentation for this.
Hint on diff: Invocation time, invocation method, invocation location among many others
mstradling
Inlines run as part of the form building process (the end user doesn't get to directly interact with an inline) so are good for:
- Running a Db query to dynamically populate a drop down list.
- Include a standard set of fields in to a number of templates rather than re-typing and giving yourself maintainence headaches when you need to change them all down the line.
Callouts run on some user action (e.g. clicking a form button) and the end user can directly interact with them so are good for:
- Displaying a search form that lets the user search a Db to find a result.
- Simplify data-entry with more elegent tools that the standard form permits (e.g. a calendar pop-up in place of year/month/day dropdowns or requiring the user to type a correctly formatted date string in a text box).
CallServer() calls are callouts but ones they are initiated by code rather than a user action and enable you to code some form of reaction based on the result (e.g. user selects one of 2 radio buttons triggering a callServer() that queries a Db and pulls back real-time values to populate a select list).
The big gotcha with callServer() calls is that they are asyncronous, so if your using FormAPI to automatically name your DCRs and a callServer() to check the name isn't already in use do it as soon as you can. Try to do it onSave and the callServer() will be triggered but FormAPI will move on with the onSave handler, save/close the form window before the callServer() command has had time to complete and return yes/no.