Solved

Block opening of a specific form displayed in a view

Posted on 2013-10-30
8
305 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Independent Software Vendors: 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!

Question has a verified solution.

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

Salesforce.com’s Console is a great tool to view activities, leads, contacts, accounts and opportunities all in one screen. It is particularly effective during call blocks and working numerous activities at a time in a quick, repetitive fashion (suc…
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 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 …

679 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