Condizioni di notifica
Questo evento viene notificato dal framework quando viene richiesto di mostrare all'utente uno degli allegati di un documento. Solitamente viene generato perché viene chiamata da codice la procedura ShowAttachment del documento.
Utilizzo consigliato
L'evento deve presentare l'allegato all'utente. Normalmente questo avviene attraverso la procedura OpenDocument dopo aver salvato l'allegato sul file system.
Argomenti
Doc | Oggetto di tipo IDDocument che rappresenta il documento che ha richiesto di mostrare all'utente uno dei suoi allegati. |
Code | Stringa che rappresenta il codice dell'allegato da aprire. |
Result | Parametro booleano di output che deve essere impostato a true se l'operazione è riuscita. |
Esempio di codice
// *********************************************************
// Fired when a document asks to show one of its attachments
// *********************************************************
event DocumentHelper.ShowAttachment(
IDDocument Doc // Document that wants to show its attachment
string Code // Attachment Code
inout boolean Result // Set it to true if the attachment is found
)
{
string AttID = "" //
//
AttID = Myapp.AttachmentManagement.GetAttachmentID(Code, Doc.docID())
//
if (AttID <> "")
{
Result = true
Myapp.openDocument(Myapp.AttachmentManagement.GetWebFile(AttID), ...)
}
}
// Fired when a document asks to show one of its attachments
// *********************************************************
event DocumentHelper.ShowAttachment(
IDDocument Doc // Document that wants to show its attachment
string Code // Attachment Code
inout boolean Result // Set it to true if the attachment is found
)
{
string AttID = "" //
//
AttID = Myapp.AttachmentManagement.GetAttachmentID(Code, Doc.docID())
//
if (AttID <> "")
{
Result = true
Myapp.openDocument(Myapp.AttachmentManagement.GetWebFile(AttID), ...)
}
}
Si ricorda che il framework non stabilisce come devono essere memorizzati gli allegati, ma solo la canalizzazione degli eventi ad essi relativi.
Ultima modifica: 02/03/2022 / Validità: da 6.5.2680