Error trying to edit object during BeforeSetObjectPermission event handling

Hello.

I have a following task: "if there were added a specific usergroups to permissions of object then to clear a field of this object."

I created an eventhandler for event BeforeSetObjectPermissions, it is successfully triggering on adding of usergroups, but I am unable to clear the fields of object. Looks like it is not allowed to make changes in objects during BeforeSetObjectPermissions event handling. I am receiving the error "Operation not allowed. Script is being executed for the object "48". (0x80040834)" at the row with CheckOut or SetProperty function.

Is there any way to solve this problem?

Thank you!

  • Hi Aleks,

    We have similar request and idea some while ago and have tried the same concept. Unfortunately this does not seem to work.

    At the end we have implemented auto workflow transition which checks periodically if (in our case) certain key employees have been changed and transition automatically to another workflow state where re-assign documents. The key is that in next state you are in separate transaction and you can do your action.

    I believe that you could use similar technique in you case: verify if usergroup has been changed (obviously you would need to keep track of used one and check if it is different from the new one, in our case we kept initial key employees as metadata on document so we could easily compared later) and when you transition in next step you do your reset (separate transaction). You can automatically navigate back to original workflow state so users would not experience anything.

    Perhaps it could help you.

    Dejan

  • Hi Dejan! Thnks for your answer! I am understand your idea and I tried to realize it for my task, but i found that any kinds of change permissions tracking at workflow state transition are triggering only at state transition from previous state or at checking-in of object. So if the object already have a current state and I change the permission only, it will not be triggered and the state transition will not be happen. I tried to use standard transition condition (available for edit to user/usergriups) and VBScript condition that sets AllowStateTransition = true and both of them are not working this way.

    You said you used some kind of transition that checks the condition periodically but I did not find a way to make such periodical checking. Could you please tell me how to do this? Thank you!

  • Hi Aleks, 

    It is a concept of automatic state transitions. You can read more closely here: https://developer.m-files.com/Frameworks/Vault-Application-Framework/Attributes/Workflows/#automatic-state-transitions.

    There are triggered periodically, default config is each hour but you can configure it run more often if you need.

    Inside of that transition, you would need to have your verification logic and in case it applies you would move it into next state where you make your metadata reset. Then you could configure transition back immediately back into original state and users would not experience the reset workflow state afterwards.

    Hope it helps you

    Dejan

  • So I haven't tried this myself before, but you should not need to check out the current object during an event handler; it should already be checked out.

    I'm not saying that this will definitely work, but the concept of checking the object out should not be needed.

    Do you get the same error thrown with just the SaveProperty call?  Can you show me the code you're trying and the full error stack?

  • Hi, Craig!

    I tried to make SetProperties alone as so as together to CheckIn and CheckOut and received the same error.

    Here is my reduced code (I made it for testing and it is also shows me an error "Operation not allowed. Script is being executed for the object")

    If ObjVer.Type = 0 then 
    
        Dim newPropertyValues: Set newPropertyValues = CreateObject("MFilesAPI.PropertyValues")
        Dim newPropertyValue: Set newPropertyValue = CreateObject("MFilesAPI.PropertyValue")
    
        newPropertyValue.PropertyDef = 1044
        newPropertyValue.TypedValue.SetValue MFDatatypeMultiLineText, "121212"
        newPropertyValues.Add -1, newPropertyValue
    
        Vault.ObjectPropertyOperations.SetProperties ObjVer, newPropertyValues '<< The error occurs on this row
        
    End if

     The error description is :

    CoScriptObjectFactory.cpp, 465, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    ScriptErrorHelper.cpp, 96, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MDispatchExImpl.h, 694, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MDispatchExImpl.h, 994, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataCardAction.cpp, 386, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataCardAction.cpp, 570, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataEditor.cpp, 2967, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataModel.cpp, 4266, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataModel.cpp, 4763, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    CoVaultMountingDocumentOperations.cpp, 3600, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 5954, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 6019, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 19901, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCMethodCallWithRetry.h, 28, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCMethodCallWithRetry.h, 28, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperations.cpp, 13190, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperations.cpp, 8120, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MCallInLoop.h, 712, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 1417, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 1602, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelperPrivate.cpp, 13413, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 25842, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultDBSessionEvents.cpp, 428, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultDBSessionEvents.cpp, 1602, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 269, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 328, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 328, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultScriptSessionTemplates.cpp, 501, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoActiveScriptSite.cpp, 893, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoActiveScriptSite.cpp, 735, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    AfterSetObjectPermissions::pep22, 49, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 381, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 406, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 475, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    ServerVaultObjectPropertyOperationsHelper.cpp, 415, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCObjectOperationsHelper.cpp, 109, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoRPCOverCOM.cpp, 6153, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperations.cpp, 7384, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    MCallInLoop.h, 712, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 3930, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 3460, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelperPrivate.cpp, 10809, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 10495, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 11898, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 425, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 1118, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 1323, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    (M-Files 21.4.10123.9)

  • Hi, Craig!

    I tried to make SetProperties alone as so as together to CheckIn and CheckOut and received the same error.

    Here is my reduced code (I made it for testing and it is also shows me an error "Operation not allowed. Script is being executed for the object")

    If ObjVer.Type = 0 then 
    
    	Dim newPropertyValues: Set newPropertyValues = CreateObject("MFilesAPI.PropertyValues")
    	Dim newPropertyValue:  Set newPropertyValue  = CreateObject("MFilesAPI.PropertyValue")
    
    	newPropertyValue.PropertyDef = 1044
    	newPropertyValue.TypedValue.SetValue MFDatatypeMultiLineText, "121212"
    	newPropertyValues.Add -1, newPropertyValue
    
    	Vault.ObjectPropertyOperations.SetProperties ObjVer, newPropertyValues '<< Here the error occurs
    End if

    The full text of error:

    CoScriptObjectFactory.cpp, 465, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    ScriptErrorHelper.cpp, 96, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MDispatchExImpl.h, 694, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MDispatchExImpl.h, 994, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataCardAction.cpp, 386, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataCardAction.cpp, 570, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataEditor.cpp, 2967, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataModel.cpp, 4266, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MetadataModel.cpp, 4763, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    CoVaultMountingDocumentOperations.cpp, 3600, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 5954, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 6019, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 19901, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCMethodCallWithRetry.h, 28, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCMethodCallWithRetry.h, 28, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperations.cpp, 13190, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperations.cpp, 8120, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    MCallInLoop.h, 712, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 1417, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 1602, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelperPrivate.cpp, 13413, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 25842, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultDBSessionEvents.cpp, 428, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultDBSessionEvents.cpp, 1602, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 269, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 328, Script execution failed. ((AfterSetObjectPermissions::pep22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 328, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultScriptSessionTemplates.cpp, 501, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoActiveScriptSite.cpp, 893, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoActiveScriptSite.cpp, 735, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    AfterSetObjectPermissions::pep22, 49, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 381, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 406, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 475, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    ServerVaultObjectPropertyOperationsHelper.cpp, 415, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCObjectOperationsHelper.cpp, 109, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoRPCOverCOM.cpp, 6153, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperations.cpp, 7384, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    MCallInLoop.h, 712, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 3930, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 3460, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelperPrivate.cpp, 10809, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 10495, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 11898, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 425, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 1118, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 1323, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    (M-Files 21.4.10123.9)

  • The error message says that this is an "AfterSetObjectPermissions" event, not "before".  It also references line 49, but I can't see a line 49 in your posted code:

    AfterSetObjectPermissions::pep22, 49, Operation not allowed. Script is being executed for the object "48". (0x80040834)

    Can you confirm which event you're using?  "After" events generally cannot alter the object, but the "before" events generally can.

    Regards,

    Craig.

  • Hi Craig!

    Actually i already tried both of Before and After events and sent you result of the last used. I made the same using Before ebent and received this error:

    CoScriptObjectFactory.cpp, 465, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    ScriptErrorHelper.cpp, 96, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MDispatchExImpl.h, 694, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MDispatchExImpl.h, 994, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MetadataCardAction.cpp, 386, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MetadataCardAction.cpp, 570, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MetadataEditor.cpp, 2967, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MetadataModel.cpp, 4266, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MetadataModel.cpp, 4763, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    CoVaultMountingDocumentOperations.cpp, 3600, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 5954, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 6019, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    DocumentCache.cpp, 19901, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCMethodCallWithRetry.h, 28, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCMethodCallWithRetry.h, 28, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCDocumentOperations.cpp, 13190, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCDocumentOperations.cpp, 8120, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    MCallInLoop.h, 712, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 1417, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 1602, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelperPrivate.cpp, 13413, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    RPCDocumentOperationsHelper.cpp, 25733, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    VaultDBSessionEvents.cpp, 428, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    VaultDBSessionEvents.cpp, 1602, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 269, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 328, Script execution failed. ((BeforeSetObjectPermissions::test22: 48-47)) (0x800408BB)
    VaultScriptSessionTemplates.cpp, 328, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultScriptSessionTemplates.cpp, 501, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoActiveScriptSite.cpp, 893, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoActiveScriptSite.cpp, 735, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    BeforeSetObjectPermissions::test22, 50, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 381, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 406, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoVaultObjectPropertyOperations.cpp, 475, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    ServerVaultObjectPropertyOperationsHelper.cpp, 415, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCObjectOperationsHelper.cpp, 109, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    CoRPCOverCOM.cpp, 6153, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperations.cpp, 7384, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    MCallInLoop.h, 712, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 3930, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 3460, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelperPrivate.cpp, 10809, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 10495, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    RPCDocumentOperationsHelper.cpp, 11898, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 425, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 1118, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    VaultTrTrackerHelper.cpp, 1323, Operation not allowed. Script is being executed for the object "48". (0x80040834)
    (M-Files 21.4.10123.9)

  • I have just had time to test this, and can confirm that this does not seem to be directly possible, at least in a general way, using the events you mention.

    I tried to change the permissions on an object that was not checked out.  In the "BeforeSetObjectPermissions" event handler I could not call "SetProperty" as it complained that the object was not checked out, but I could not call CheckOut as it complains about the script running.

    What is interesting is that if I check the object out manually (in the desktop client: right-click and check out), then the SetProperty call on its own works fine (no checkout/checkin needed); when the object is checked in, it has the updated property value.  Unfortunately, though, this is not how users generally interact with objects, so it's not a good solution.

    My initial testing seems to indicate that the same occurs with AfterSetObjectPermissions.

    My conclusion is that this is not going to be possible to write this in a meaningful way using BeforeSetObjectPermissions/AfterSetObjectPermissions events.

    I think that you may need to do this within a "BeforeCheckInChangesFinalize" event handler (this runs for both new and updated objects).  That most definitely CAN update the object properties.

  • Hi Craig!

    Thank you for your answer! I am sure that I could use BeforeCheckInChangesFinalize eventhandler, but the problem is that changing of only permission (not properties) is not followed by adding a new version of object. I mean I can chenge permissions a few times and all of these changes will be saved in the same version of object, overriding each other. But my task is to compare the current permissions and the previous one and trigger my code only if permissions was changed in comparsion to previous permissions (even if previous permissions was set in the current verson of object).

    In BeforeSetObjectPermissions I can do this, but in BeforeCheckInChangesFinalize I can compare permissions only to that ones tha was set in previous version of object, but in this case i will miss all permissions that was set in the current version of object.