Note that there are some explanatory texts on larger screens.

plurals
  1. POAttach a file to a notes document using SSJS
    primarykey
    data
    text
    <p>I am trying to attach a file to notes document, but I am getting the following error.</p> <pre><code> var doc:NotesDocument = DS_EmpDetails.getDocument(); var rtitem:NotesRichTextItem = doc.createRichTextItem("AttachmentField"); var Attachment:String = "C:\\Users\\karthick_m\\Desktop\\PDFIcon.jpg"; var emobj:NotesEmbeddedObject = rtitem.embedObject(NotesEmbeddedObject.EMBED_ATTACHMENT, "", Attachment, null); doc.save(); </code></pre> <p>I am getting the following error..</p> <pre><code> [TypeError] Exception occurred calling method NotesRichTextItem.embedObject(number, string, string, string) null </code></pre> <p>Thanks in Advance...</p> <p>My Stack Trace <strong>Stack Trace</strong></p> <p>javax.faces.FacesException: Error while executing JavaScript action expression com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:102) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96) com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250) com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:206) com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:189) com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:154) com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137) com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:86) com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:538) com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1140) com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:803) com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:758) com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:527) com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1124) com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:513) com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:342) com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:304) com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:261) com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:291) com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(JavaScriptMethodBinding.java:126) com.ibm.xsp.application.ActionListenerImpl.processAction(ActionListenerImpl.java:60) javax.faces.component.UICommand.broadcast(UICommand.java:324) com.ibm.xsp.component.UIEventHandler.broadcast(UIEventHandler.java:365) com.ibm.xsp.component.UIDataPanelBase.broadcast(UIDataPanelBase.java:400) com.ibm.xsp.component.UIViewRootEx.broadcast(UIViewRootEx.java:1490) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:307) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:428) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:94) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96) com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250) com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:206) com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:189) com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:154) com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137) com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:86)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload