Solved

Block opening of a specific form displayed in a view

Posted on 2013-10-30
8
304 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

I showed you how to use console view (HERE (http://www.experts-exchange.com/articles/18379/Getting-Started-and-Using-the-Salesforce-com-Console.html)) -– but how do you set it up on the admin side of Salesforce? Note that you have to have Admin leve…
Note: You must have administrative privileges in order to configure lead or case queues. Salesforce.com (http://www.Salesforce.com) is a cloud-based customer relationship management (CRM) system. It is widely used around the world by sales and ma…
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 …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

790 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