StandardProfile.Description
This property returns/sets the description of the Standard Profile.
SVB Example
Data Entry Example 12: Updating and Bumping an object's SDMS version number:
Sub Main 'Note that this example assumes that SDMS integration is enabled. 'Continuing our demotion of Blake from the previous example, we will 'now remove any explicit permissions of his that are connected to this 'DE setup. He may be an explicit user with edit permissions, so this 'will remove him. He is still a member of the "Everyone" group and can 'access this setup, but he will no longer be able to edit it. Dim oOM As ObjectManager 'Reconnect into Enterprise Set oOM = New ObjectManager oOM.Reconnect Application 'Retrieve our data entry setup Dim breadkMeasurements As StandardProfile Set breadkMeasurements = oOM.Profiles("/Blake's Materials/Bread Measurements") breadkMeasurements.AutoSave = False 'Detail our information about the changes Dim deUpdate As New ProfileUpdateInfo deUpdate.AuditLogReason = "Update description. Remove Blake's permissions." 'We will consider this a major change, so the version number will 'be "bumped" to the next full version. For example, if the current version 'is 3.1, then this will change it to 4. deUpdate.BumpDocumentVersion = True 'This step is optional. We are setting our update info to store the DE setup's revision 'number while we make changes to it. If, during the execution of this macro, another 'user commits changes to this DE setup before we save it here, then an 'error will be triggered here when SaveEx is called. When SaveEx is called, the revision number 'in deUpdate is compared to what is currently in the Enterprise database. If the setup's current 'revision number is different from what we started with here, then we will get an error. If oOM.SystemOptions.SDMSIntegration.Enabled = True Then deUpdate.CurrentRevision = oOM.SDMSHelper.CurrentDocumentRevision(Application.Handle, _ oOM.SDMSHelper.ProfileDocumentID(Application.Handle, breadkMeasurements.ID) ) End If 'Go through the permissions in the DE setup and look for the user "Blake". If found, 'then he will be removed. For i = 1 To breadkMeasurements.AccessControlList.Count Set permissionItem = breadkMeasurements.AccessControlList.Item(i) If permissionItem.IsUser And permissionItem.Name = "Blake" Then breadkMeasurements.AccessControlList.Remove(i) Exit For End If Next 'Add a description to the DE setup while we are here. breadkMeasurements.Description = "Entry for ingredients measurements" 'Commit our changes breadkMeasurements.SaveEx(deUpdate) oOM.Disconnect End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.