DeleteKeyValue

myNamespaceModule.DeleteKeyValue(keyName[, isUserSpecific][, timeoutInSeconds]);

myNamespaceModuleThe name of the namespace-specific module instance
keyNameA STRING naming the key; may not be an empty string; REQUIRED
isUserSpecificIf TRUE, the system will look only for private keys; if FALSE then the system will look for global keys; OPTIONAL, defaults to FALSE
timeoutInSecondsThe number of seconds to wait for the underlying SOAPCALL to complete; set to zero to wait forever; OPTIONAL, defaults to zero
Return:A DeleteKeyValueResponseRec RECORD

The DeleteKeyValue function deletes a previously-set key and value within a namespace.

Example:

IMPORT STD;

myStore := STD.System.Store();
myNamespace := myStore.WithNamespace('Config', 'MyStore');

// Delete a global key
result1 := myNamespace.DeleteKeyValue('ApiEndpoint');
OUTPUT(result1.succeeded);

// Delete a user-specific key
result2 := myNamespace.DeleteKeyValue('UserPreference', TRUE);
OUTPUT(result2.succeeded);

See Also: DeleteKeyValueResponseRec