Jeff Stevens
02/10/2023, 9:42 PMAnna
02/11/2023, 11:15 PMfolderName = createObject("java", "microsoft.exchange.webservices.data.core.enumeration.property.WellKnownFolderName");
mailBox = CreateObject("java","microsoft.exchange.webservices.data.property.complex.Mailbox").init("user@domain","SMTP")
subject = CreateObject("java","java.lang.String").init("test");
MessageBody = CreateObject("java","microsoft.exchange.webservices.data.property.complex.MessageBody").init();
body = MessageBody.getMessageBodyFromText("test123")
appoitnment = CreateObject("java","microsoft.exchange.webservices.data.core.service.item.Appointment").init(ExchangeService);
formatter = CreateObject("java", "java.text.SimpleDateFormat").init("dd-mm-yyyy hh:mm:ss");
appoitnment.setStart(formatter.parse("2023-02-15 01:00:00"));
appoitnment.setEnd(formatter.parse("2023-02-15 02:00:00"));
appoitnment.setSubject(subject);
appoitnment.setBody(body);
SendInvitationsMode = CreateObject("java","microsoft.exchange.webservices.data.core.enumeration.service.SendInvitationsMode");
folderIDCalendar = CreateObject("java","microsoft.exchange.webservices.data.property.complex.FolderId").init(
folderName.Calendar,
mailBox);
// appoitnment.save(folderIDCalendar, SendInvitationsMode.SendToNone)
// appoitnment.save(SendInvitationsMode.SendToNone)
appoitnment.save(folderName.Calendar , SendInvitationsMode.SendToNone)
Tim
02/13/2023, 9:46 PMdswitzer
02/14/2023, 12:25 PMdswitzer
02/15/2023, 12:07 PMSteve
02/15/2023, 4:45 PMJeff Stevens
02/15/2023, 6:11 PMawait $.ajax(
{
type : "POST",
url : "./includes/ajaxColdfusion/formEditor/publishUnpublish.cfc?method=publish",
data : JSON.stringify(sendData),
dataType : "json",
cache : false
}
)
The javascript console keeps returning the following error:
jquery-3.6.1.min.js:2 POST http://localhost:9001/includes/ajaxColdfusion/formEditor/publishUnpublish.cfc?method=publish 400 (Bad Request)
I've attached screenshots of the error as well.
I understand the change that I've made from Lucee to Adobe ColdFusion 2018 must mean that there's something to do with the way cfcs are accessed remotely, as I can access this method and successfully get an output if I copy and paste the address into my browser.
I'm curious if anyone knows what mistake I might be making or if there's a resource for devs trying to take a Lucee app and make it work for Adobe ColdFusion.rickmason
02/16/2023, 3:27 AMgus_dancy
02/16/2023, 3:58 PMgus_dancy
02/16/2023, 4:02 PMgus_dancy
02/16/2023, 4:03 PMgus_dancy
02/16/2023, 4:03 PMRussell Estcourt
02/16/2023, 4:07 PM<cfscript>
local.array = [1,2,3]
local.array.each((struct item, numeric rowNumber) => {
dump(arguments.item);
});
</cfscript>
This errors with Invalid call of the function [lambda_7o0h], first Argument [item] is of invalid type, Cannot cast Object type [Number] to a value of type [struct]
as expected but no error on our staging env. Anyone know what config controls this?gus_dancy
02/16/2023, 4:08 PMelpete
02/16/2023, 7:04 PMelpete
02/16/2023, 7:04 PMAdam Cameron
gsr
02/16/2023, 9:19 PMgsr
02/16/2023, 9:20 PMJeff Stevens
02/17/2023, 8:18 PM<cfloop index="i" from="1" to="#rc.tblFormDataForFormFK.recordCount()#">
<cfscript>
// Each row of the submission viewer page is stored in a submission record query object
local.submissionRecord = rc.submissionResponses.filter( function(_submissionRecord)
{
return _submissionRecord.FormDataFK is rc.tblFormDataForFormFK.getRow(i).FormDataPK;
});
</cfscript>
...
So what I'm doing is I'm calling queryFilter at the top of a loop. In Lucee, this worked as expected: The function called stored a query object within local.submissionRecord
containing all of the rows from rc.tblFormDataForFormFK
that had the same FormDataFK column. It appears queryFilter iterates on every row of the query it is called for, as placing a writeDump inside of the queryFilter callback function printed a message for each row in rc.tblFormDataForFormFK
. For every invocation at the start of the loop, this works.
Switching over to Adobe ColdFusion, it seems like the queryFilter function doesn't work the same way. The first step the function ran and it worked correctly, producing the same result as Lucee. On the second step of the loop, it only seemed to iterate over several of the rows within the queryFilter function, as the same writeDump statement as I mentioned earlier did not print a number of messages nearly equal to the number of rows in the query being filtered. On the 3rd step of the outer loop, no write dump messages were printed.
My question is, is this intentional behavior? What can I do to get queryFilter to filter over the entire query on each step of the outer loop?Harry F
02/18/2023, 3:33 PMwebsolete
02/20/2023, 8:32 PMrickmason
02/21/2023, 5:54 AMDave Merrill
02/21/2023, 3:08 PMSimone
02/21/2023, 7:26 PMmy try: <cfset x = try { isDefined('array[1]') } ? catch(any e) {0} : array[1]>
is the above rightSimone
02/21/2023, 7:26 PMWilzDezign
02/22/2023, 12:39 AMSimone
02/22/2023, 3:32 PMrichard.herbert
02/22/2023, 7:09 PMjohnbarrett
02/24/2023, 12:01 AM