Lotus Notes Rule error

Posted on 2011-05-09
Last Modified: 2013-12-18
Has anyone ever seen the error "Error in CompactMailRules function 13: Type mismatch" when trying to set a new rule active in LN? I tried recreating the rule and it keeps populating this error when i try to enable it.

I never had this issue creating rules for other people... any ideas how i can get ride of this thing? Or a workaround in the interim?

Question by:RobertetInc
    LVL 46

    Accepted Solution

    LVL 46

    Expert Comment

    by:Sjef Bosman
    Do = Does
    LVL 4

    Expert Comment

    Try to run this agent which will clean the mail rules - it will compare what is in the mail rules view with the rules stored in dedicated fields in the Calendar profile document, where the router task is actually looking when dispatching the mails to the mail file.
    Sub Initialize
    	Dim s As New notessession
    	Dim db As notesdatabase
    	Dim rulesfolder As notesview
    	Dim rules As notesviewentrycollection
    	Dim rule As notesviewentry
    	Dim ruledoc As notesdocument
    	Dim intCleanedDisabled As Integer
    	Set db=s.currentdatabase
    	Set rulesfolder=db.getview("Rules")
    	Set rules=rulesfolder.allentries
    	Set profile=db.GetProfileDocument("CalendarProfile")
    	'Remove rule entries from the Calendar Profile which did not disable as expected.
    	'The code can be used if you want to "clean out" the rule entirely in the profile.
    	If profile.getitemvalue("Use_CalendarRule")(0) = "1" Then
    		profile.Use_CalendarRule = "0"
    	End If
    	Set Count=profile.getfirstitem("$FilterFormulaCount")
    	On Error Resume Next
    	Call count.remove
    	Forall ff In profile.Items
    		If ff.type = 1536 And Lcase(Left(,15)) = "$filterformula_" Then 
    			Call ff.remove
    			intCleanedDisabled = intCleanedDisabled + 1
    		End If 
    	End Forall 
    	Call profile.Save(True, True)
    	If intCleanedDisabled > 0 Then
    		Msgbox "Cleaned disabled mail rules: " & Cstr(intCleanedDisabled)
    		Msgbox "No mail rules needed to be cleaned / removed"
    	End If
    	If profile.getitemvalue("Use_CalendarRule")(0) = "1" Then
    	End If
    	Set rule=rules.getfirstentry
    	While Not rule Is Nothing
    		Set ruledoc=rule.document
    		Call, True)
    		Set rule=rules.getnextentry(rule)
    End Sub

    Open in new window

    LVL 15

    Expert Comment

       Hi there RobertetInc,,,

    May I get some clarifications about the following :

    * What is the version of LN you have ???
    * Did you try to access your mailbox on another PC and check if you have the same problem over there ????

    Best Wishes


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
    IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now