Solved

Block opening of a specific form displayed in a view

Posted on 2013-10-30
8
303 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What make java scalable ? 6 92
Open source customer support/help desk options? 10 172
Goldmine connection - vendor initialization failed 2 104
crm 2010 on premise 5 77
Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
Note: You must have administrative privileges in order to create/edit Sharing Rules. Salesforce.com (http://www.salesforce.com) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales an…
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 …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

831 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