Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

easy one regarding scope and cfinvoke

$
0
0

Why does this work?

<cfset projectList = Application.Projects.getProjects(CompanyID=request.User.CompanyID)>

 

BUT, this throws an error?(Could not find the ColdFusion component or interface Application.Projects)

<cfinvoke component="Application.Projects" method="getProjects" returnvariable="projectList">

<cfinvokeargument name="companyID" value="#request.User.CompanyID#">

</cfinvoke>

 

I understand that cfinvoke is trying to look for an 'Application' directory, correct?  The Projects.cfc is located within a directory names 'sys'.  Would it be a better idea to use:

<cfinvoke component="sys.Projects" method="getProjects" returnvariable="projectList">

<cfinvokeargument name="companyID" value="#request.User.CompanyID#">

</cfinvoke>

 

Basically, is the above the same as:

<cfset projectList = Application.Projects.getProjects(CompanyID=request.User.CompanyID)>


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>