Error -> Could not get default view id for database (Tracking.nsf)

when I added the new code

Dim rtitem As notesrichtextitem
      Set rtitem = message.createrichtextitem( "Body" )
      
      Call rtitem.AppendDocLink( uidoc.document , "link to document" )
      Call rtitem.AddNewLine(2)
      Call rtitem.AppendText( COMMENT )

I get that error and nothing happens?
JaziarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bozzie4IT ArchitectCommented:
You need a default view in the database

So choose one of your views, and click the propery ' Default when database is first opened'
I don't think it's necessary that the document actually is in that view, but it is possible that it should.

cheers,

Tom
1
JaziarAuthor Commented:
OK I made a default view - I get the email with the link icon - click it and get the message can not locate default form?

Thanks for staying with me Tom
0
Bozzie4IT ArchitectCommented:
Note : The default view should be accessible to everybody who uses the database, and it can't be hidden (name between () ).

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

ArunkumarCommented:
now you should have a default form for the database.

you can have this by the form properties.

Pick the main form in your application and make it the default form.

:-)
0
JaziarAuthor Commented:
It is open to all readers.
0
ArunkumarCommented:
Now the real problem is your document does not have a "Form" Field i guess  check it out.
0
JaziarAuthor Commented:
It is working now!!!!!!!!!!!!!  
0
Bozzie4IT ArchitectCommented:
You don't really need an actual form field, but it could help to add a line like

uidoc.document.Form="nameOfYourForm"

Or make the form you want it to open with, the default form.

cheers,

Tom

0
JaziarAuthor Commented:
Arunkumar - I owe you some points and I wanted make sure you got them.  
Thanks to both of you
0
ArunkumarCommented:
No problem Jaz !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.