how to create service using JavaScript code in particular Thing
how to create service using JavaScript code in particular Thing. I created new Thing code using but how to create service using JavaScript code in particular Thing code.
step1: Thing created using JavaScript code.
var params = {
name:"Scheduler_Dynamic_CRON139ol" /* STRING */,
description: "DEMO Scheduler With CRON dynamically set" /* STRING */,
thingTemplateName:"MyCustomScheduler" /* THINGTEMPLATENAME */,
projectName:"MailserverGoogle" /* PROJECTNAME */,
runAsUser:"Hariharasuthan",
schedule:"0 0/1 * * * ?"
}
Resources["EntityServices"].CreateThing(params);
};
step2: below this is service code but how to implement in Thing(step1) using code wise implementation?
Things["Mailserver_google"].SendMessageWithAttachment({
cc: "harisuthanlive@gmail.com" /* STRING */,
path: "52.xlsx" /* STRING */,
bcc: undefined /* STRING */,
subject: "me test Report one mintues " /* STRING */,
fileRepository:"SystemRepository" /* THINGNAME */,
attachmentName:"52.xlsx" /* STRING */,
from: "jjj@gmail.com" /* STRING */,
mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" /* STRING */,
to: "jj@gmail.com" /* STRING */,
body: "Report At"+datetime/* HTML */
});

