Solved

Block opening of a specific form displayed in a view

Posted on 2013-10-30
8
311 Views
Last Modified: 2013-11-03
I have a view in Notes that displays values from 2 different forms A & B
Form B must be edited from an embedded view in form A
I would like to allow users to open form A from the view but not form B.
I would like to display a message 'Please edit form B from within form A' when they double click it to open.
How do I do this?

Thanks.
0
Comment
Question by:kcoxon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39613179
You could also make it so that doc A is opened when doc B is double-clicked, if you know how to find doc A from doc B. Is there a parent-child (aka document-response) relation?
0
 

Author Comment

by:kcoxon
ID: 39613494
There is not a 'proper' response hierarchy however Form B (Contact) is always created from Form A (Company) where amongst other fields I use @Unique in Form A inherited into Form B.
How would I achieve what you suggest/
I am not familiar with LS, only formulas.
Is there not something I can do in the PostOpen event or similar?
Thanks
0
 
LVL 4

Assisted Solution

by:umeli
umeli earned 200 total points
ID: 39613522
Hi
With LS its simple. you just capture the QueryOpenDocument event in the view.
And with Source.Documents.getFirstDocument() you can access the document.
Then you check for the form. If it's Form B, search for the Company and use the NotesUIWorkspace.EditDocument() to open that document instead.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 300 total points
ID: 39613546
Indeed, and with Formula it's impossible. Try this first, in every view that displays documents created with form B (code essentially from the Designer Help database):

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
  Dim docs As NotesDocumentCollection
  Dim doc As NotesDocument
  Set docs = Source.Documents
  Set doc = docs.GetFirstDocument
  If doc.Form(0) ="B" Then
    MsgBox "Please edit form B from within form A"
    Continue = False
  End If
End Sub
0
 

Author Comment

by:kcoxon
ID: 39613593
Perfect. You're a star.
Thansk
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39613616
In all fairness, I only finished umeli's suggestion...
0
 

Author Comment

by:kcoxon
ID: 39613625
True but when I said 'I am unfamiliar with LS' a more prescriptive answer was required.
These things are only simple when you know!

Yours was just copy and paste so for me the perfect solution.

Can I change the points assignment?
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39613655
I'll ask for the the question to be reopened...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Regular maintenance of GroupWise Mailbox keeps it running flawlessly. Sometimes, it is also seen that mailbox maintenance is needed for resolving various issues of mailbox and other Novell GroupWise database. By using the ‘Repair Mailbox’ feature, a…
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

622 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