Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- JavaScript object: SCFile
- JavaScript method: SCFile.deleteAttachment( attachID )
- JavaScript method: SCFile.deleteAttachments()
- JavaScript method: SCFile.doAction()
- JavaScript method: SCFile.doCount()
- JavaScript method: SCFile.doDelete()
- JavaScript method: SCFile.doInsert()
- JavaScript method: SCFile.doPurge()
- JavaScript method: SCFile.doRemove()
- JavaScript method: SCFile.doSave()
- JavaScript method: SCFile.doSelect()
- JavaScript method: SCFile.doUpdate()
- JavaScript method: SCFile.getAttachment( attachID )
- JavaScript method: SCFile.getattachments()
- JavaScript method: SCFile.getBinary()
- JavaScript method: SCFile.getFirst()
- JavaScript method: SCFile.getLast()
- JavaScript method: SCFile.getLastRC()
- JavaScript method: SCFile.getMessages()
- JavaScript method: SCFile.getNext()
- JavaScript method: SCFile.getPrev()
- JavaScript method: SCFile.getPurgedRowCount()
- JavaScript method: SCFile.getText()
- JavaScript method: SCFile.getType()
- JavaScript method: SCFile.getXML()
- JavaScript method: SCFile.insertattachment()
- JavaScript method: SCFile.isRecord()
- JavaScript method: SCFile.setBinary()
- JavaScript method: SCFile.setFields()
- JavaScript method: SCFile.setOrderBy()
- JavaScript method: SCFile.setRecord()
- JavaScript method: SCFile.updateAttachment( attachObj )
JavaScript method: SCFile.deleteAttachment( attachID )
This method deletes a specific attachment associated with the current file record.
Values passed to deleteAttachment() will normally be ones obtained from a previous insertAttachment(), updateAttachment(), or getAttachments() operation.
Before calling deleteAttachment, you must establish a current record using one of the positioning methods, such as doSelect(), getNext(), etc.
Syntax
SCFile_object.deleteAttachment( attachID );
Arguments
deleteAttachment() takes one argument, which is a string containing an attachment ID of the cid:xxxxx form.
Return values
If successful, deleteAttachment() returns RC_SUCCESS
. Otherwise. it returns an error return code. For example, it returns RC_NO_MORE
if the attachment was not found.
Example
This example does the following:
- Selects one record from the probsummary file
- Deletes one attachment associated with the current record
This example requires the following sample data:
- Record number IM10001 in the probsummary table
function createTestAttachment() { var attachmentObj = new Attachment(); attachmentObj.type = "text/plain"; attachmentObj.name = "MyAttachment.txt"; attachmentObj.value = "My text attachment"; var f = new SCFile( 'probsummary' ); var rc = f.doSelect( 'number = "IM10001"' ); var attachmentID = f.insertAttachment( attachmentObj ); return attachmentID; } var attachmentID = createTestAttachment(); var f = new SCFile( 'probsummary' ); var rc = f.doSelect( 'number = "IM10001"' ); var rc = f.deleteAttachment( attachmentID );