Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs

Recent posts

Wed 15 Jan 2020

The tree you are busy hugging has new branches

Fri 20 Dec 2019

Changes coming in the new year

Tue 22 Oct 2019

Domino is used by, you know, actual business people

January, 2020
   01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Search the weblog

Genii Weblog

Tip: Getting the handle to a doc on an embedded view

Mon 5 Jul 2004, 03:35 PM

by Ben Langhinrichs
I have heard this question many times, but never seen a really good answer that I remember.
Is there a way to get a handle to the selected document in an embedded view?
Rune Carlsen posted an answer to this very question in the Business Partner forum, and I think it is worth re-posting for others to use:

In a embedded view, there is a "target frame (single click)" event: 

In this, you can add a formula to catch the unid of the document: 

@SetEnvironment("DocUNID" ; @Text(@DocumentUniqueID))

Now, you can do what ever you want on this document, as you have the UNID. At least in @formulas... 

Best regards;
Rune Carlsen

Copyright © 2004 Genii Software Ltd.

What has been said:

176.1. Christopher Byrne
(07/06/2004 07:01 AM)

Most excellent outside the box kind of thinking. I hope he posts this on LDD and that Doug Finnear puts it in the FAQ of FAQs...

176.2. Martin
(07/07/2004 12:37 AM)

Not bad, bud what happen when you have opened more documents with embedded view? :-)

176.3. Martin
(07/07/2004 12:39 AM)

So, I will post another tip - in view action you can use

Set doc = db.GetDocumentByID( work.CurrentView.CaretNoteID) and you have solution in script

176.4. Rune Carlsen
(12.07.2004 04:31)

Thanks for liking it :)