Deletes a single, specified object instance of an object type.
Authorization
Administrator or authorized user (all object types); user (Comments object type only)
Syntax
APIRET APIENTRY FLGDeleteInst( PSZ pszFLGID,
PFLGEXTCODE pExtCode );
Parameters
Characters 1-6 of this ID identify the object type of this instance.
Characters 7-16 of this ID are the system-generated unique instance identifier.
See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.
Usage
Prerequisites
The value specified for the pszFLGID input parameter must exist.
Restrictions
If you are a user who has not been authorized to perform object management tasks, you can only delete Comments instances for which the value of your logged-on user ID is the same as the value of the Creator property.
Rules for object instances with relationships
For instances participating in Attachment relationships:
For instances that are contained or containers:
For instances participating in Contact relationships:
For instances participating in link relationships:
If the instance participates in link relationships, then all such relationships are deleted when the object instance itself is deleted.
For Programs instances associated with non-Program object types:
A Programs instance can be deleted at any time without affecting any associated object types.
Controlling updates to your information catalog
To keep your program as synchronized as possible with your information catalog, you should include a call to FLGCommit (see FLGCommit) after FLGDeleteInst completes successfully. If FLGDeleteInst does not complete successfully, you should include a call to FLGRollback (see FLGRollback).
Figure 56 shows the C language code required to issue the FLGDeleteInst call. This sample code deletes an object instance.
Figure 56. Sample C language call to FLGDeleteInst
APIRET rc; // Declare reason code
UCHAR pszFLGID[FLG_ID_LEN + 1]; // Unique instance identifier
FLGEXTCODE ExtCode = 0; // Declare extended code
.
. /* Get FLGID for object instance using FLGSearch. */
.
strcpy (pszFLGID,"0000330000001234");
rc = FLGDeleteInst (pszFLGID, // Instance ID
&ExtCode);