xWeb: UpdateFacadeObject ColdFusion Sample
This topic provides a ColdFusion sample for the UpdateFaceadObject xWeb method.
Sample Code
<!---
//////////////////////////////////////////////////////////////
// //
// author = Derek T. Versteegen //
// organization = American Academy of Pediatrics //
// date added = 10/18/2007 //
// date last modified = 10/10/2008 - DTV //
// //
// notes = code examples of consuming netFORUM baseline //
// xweb methods by way of ColdFusion Components //
// //
// dependancies = netforum_xweb.cfc //
// //
//////////////////////////////////////////////////////////////
--->
<!--- xWeb:UpdateFacadeObject --->
<cfsavecontent variable="indXML">
<cfoutput>
<ns:Individuals>
<ns:Individual>
<ns:ind_first_name>xxxxxx</ns:ind_first_name>
<ns:ind_mid_name>xxxxxx</ns:ind_mid_name>
<ns:ind_last_name>xxxxxx</ns:ind_last_name>
<ns:ind_change_date>#now()#</ns:ind_change_date>
<ns:ind_change_user>xWeb</ns:ind_change_user>
</ns:Individual>
</ns:Individuals>
</cfoutput>
</cfsavecontent>
<cfinvoke component="/xxxxxx/netforum_xweb" method="xweb_UpdateFacadeObject" returnvariable="qryXML">
<cfinvokeargument name="nfws_token" value="#session.nfws_token#" omit="no">
<cfinvokeargument name="szObjectName" value="xxxxxx" omit="no">
<cfinvokeargument name="szObjectKey" value="xxxxxx" omit="no">
<cfinvokeargument name="oNode" value="#indXML#" omit="no">
</cfinvoke>
<cfdump var="#qryXML#" label="qryXML">
Note: The element naming convention might imply that the szObjectKey is the NetForum key that identifies the object (szObjectName). In actuality, szObjectKey is the key of the item to be updated, for example, cst_key or adr_key, and so on. The following example shows the szObjectKey used to identify the ind_cst_key.
.
.
.
<cfinvokeargument name="szObjectName" value="Individual" omit="no">
<cfinvokeargument name="szObjectKey" value="787a324a-9e75-4e1d-908c-13c0e18aa00e" omit="no">
.
.
.
See Also
- xWeb: ColdFusion required core ColdFusion component for xWeb
- XWeb: Authenticate ColdFusion Sample - ColdFusion invoking the CFC that calls the Authenticate web method
- XWeb: GetIndividualInformation ColdFusion Sample - ColdFusion invoking the CFC that calls the GetIndividualInformation web method
- XWeb: InsertFacadeObject ColdFusion Sample - ColdFusion invoking the CFC that calls the InsertFacadeObject web method
- XWeb: GetQuery ColdFusion Sample - ColdFusion invoking the CFC that calls the GetQuery web method