Solved

Block opening of a specific form displayed in a view

Posted on 2013-10-30
8
297 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
  • 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
 
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Hello All, In previous article we used Hortonworks sandbox to work with Hadoop. Now, lets think to create own single node Hadoop on Linux. Here we Install and Configure Apache Hadoop on UI based Oracle Linux. I assume, you have VMware installe…
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

20 Experts available now in Live!

Get 1:1 Help Now