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

Change to javacast or json in CF2016?

$
0
0

We were running CF8 and the following code worked.

 

<cfset attributes.email = "manual2016@2016.com">
<cfset attributes.bday = "05-04">
<cfset attributes.name = "test">
<!--- <cfparam name="attributes.email" default="#form.email#">
<cfparam name="attributes.bday" default="#form.month#-#form.year#-1900">
<cfparam name="attributes.name" default="#form.name#"> --->

 

 

<cfset attributes.sdk.addContactStruct = structNew()/>
<cfset attributes.sdk.addContactStruct["Email"] = JavaCast("string", "#attributes.email#") />
<cfset attributes.sdk.addContactStruct["Birthday"] = JavaCast("string", "#attributes.bday#") />
<cfset attributes.sdk.addContactStruct["FirstName"] = JavaCast("string", "#attributes.name#") />
<cfset variables.optinreason = JavaCast("string", "Store newsletter form") />

 

 

<cfset contactId = application.sdk.addWithDupCheck(attributes.sdk.addContactStruct, "Email", variables.optinreason) />

 

 

<cfset TagcontactId = application.sdk.addToGroup(contactId, 178)/>

 

 

We did an upgrade to CF2016 and part of this code no longer works. Specifically:

 

<cfset TagcontactId = application.sdk.addToGroup(contactId, 178)/>

 

Did something in the newer versions of CF change how we need to cast variables like this when they are being past to Java?

 

I've tried to get error messages with CFTRY back but only get

Diagnostics: null null
The error occurred on line -1.


Viewing all articles
Browse latest Browse all 5794