Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Lotus Notes Rule error

Posted on 2011-05-09
Medium Priority
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
  • 2
LVL 46

Accepted Solution

Sjef Bosman earned 500 total points
ID: 35721277
LVL 46

Expert Comment

by:Sjef Bosman
ID: 35721282
Do = Does

Expert Comment

ID: 35728301
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(ff.name,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 ruledoc.save(True, True)
		Set rule=rules.getnextentry(rule)
End Sub

Open in new window

LVL 15

Expert Comment

ID: 35763621
   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


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

569 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