How to invoke CFC? - ColdFusion
How to invoke CFC?
Process 1:
<cfinvoke>
<cfinvoke component="user" method="Get" returnvariable="usr">
<cfinvokeargument name="id" value="#id#">
</cfinvoke>
Process 2:
<!--- Load CFC as an object --->
<cfobject component="user" name="userObj">
<!--- Invoke method --->
<cfinvoke component="#userObj#" method="Get" id="#id#" returnvariable="usr">
Process 3:
<cfscript>
// Load CFC as an object
userObj=CreateObject("component", "user");
// Invoke method
user_id=userObj.Get(id);
</cfscript>