Clear All Import/Forms Data from Cube

gagac
New Contributor

Hi All,

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

 

gagac_0-1673272994846.png

Thanks

 

 

2 REPLIES 2

PFugereCSO
Contributor

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.  

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