Forum Discussion

gagac's avatar
gagac
New Contributor
2 years ago

Clear All Import/Forms Data from Cube

Hi All,

Is there a way to prevent a user from selecting "Clear All Import/Forms Data from Cube" or clearing up the data?

 

Thanks

 

 

  • LeeB's avatar
    LeeB
    Contributor II

    Try this is in a WorkflowEventHandler Extensibility Rule.

     

    			Dim returnValue As Object = args.DefaultReturnValue
    				args.UseReturnValueFromBusinessRule = False
    				args.Cancel = False
    				
    				
    				Dim bValue As Boolean = args.IsBeforeEvent
    				'Evaluate the operation type in order to determine which subroutine to process
    				Select Case args.OperationName
    				Case Is = BREventOperationType.Workflow.ClearAllFormsDataFromCube
    				'Show Message Box and prevent the routine
    				If (bValue)
    				Dim ErrMsg As String
    				ErrMsg = vbcrlf & "This option has been disabled." 
    			
    				Throw New XFException(si, New Exception(ErrMsg))
    				End If
    
    
    			Case Is = BREventOperationType.Workflow.ClearAllInputDataFromCube
    				'Show Message Box and prevent the clear
    				If (bValue)
    				Dim ErrMsg As String
    				ErrMsg = vbcrlf & "This option has been disabled." 
    				Throw New XFException(si, New Exception(ErrMsg)) 
    
    				End If
    				End Select
    
  • I don't think so.  If they have the rights to enter data, they have rights to remove or clear data values too. This is only a way to clear all cells for a period they are entering.