Some existing references, which using header protection through sections and edit restrictions
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_windows8/im-trying-to-lock-the-header-and-footer-on-a-word/1c0d34b3-bdb1-4a93-9969-181c8e198785
https://wordribbon.tips.net/T011567_Protecting_Headers_and_Footers.html
Different approach for locking data for editing since Word 2010
The simplier and more flexible way to restrict editing of headers, footers in Microsoft Word document is to use Richtext Content Control (https://msdn.microsoft.com/en-us/library/bb157891.aspx). To lock the header or footer (any other blocks could be used) from editing, deleting you could select content required to be locked and click on RichText content control in Developer ribbon. As a result your selection will be enclosed in RichText content control and you will be able to set properties whose disables editing and deleting of selected content.
Thursday 23 March 2017
Tuesday 13 September 2016
Lotusscript and Computed for Display fields
Problem description:
Have a computed for display field in notes form. Add button to form with lotusscript code like:
1) get value with getItemValue - you have value from computed for display
2) refresh ui document
3) get value with getItemValue - you have no value from computed for display field
4) repeat operation with the same result
Resolution:
Put @Getfield("AnyField") formula in PostRecalc event
1) get value with getItemValue - you have value from computed for display
2) refresh ui document
3) get value with getItemValue - you have the actual value (if changes) from computed for display
Have a computed for display field in notes form. Add button to form with lotusscript code like:
1) get value with getItemValue - you have value from computed for display
2) refresh ui document
3) get value with getItemValue - you have no value from computed for display field
4) repeat operation with the same result
Resolution:
Put @Getfield("AnyField") formula in PostRecalc event
1) get value with getItemValue - you have value from computed for display
2) refresh ui document
3) get value with getItemValue - you have the actual value (if changes) from computed for display
Labels:
computed for display,
lotus notes,
lotusscript,
refresh
Friday 4 December 2015
About Domino Designer Workpace restore
Source: http://www.intec.co.uk/restoring-domino-designer-including-working-sets/
Another one: http://www.lotusguru.com/lotusguru/LGBlog.nsf/d6plinks/20100310-83ESQC
Quote:
Since 8.5.0 I’ve been searching for everything that needs to be done to restore Domino Designer. Some time ago I blogged about exporting and importing Domino Designer preferences but I had always struggled to work out which files / folders were required for Working Sets.
Today I decided to do a clean install and finally managed to track down all the relevant folders to have working sets installed in a few seconds. All are in the workspace folder
- workspace stores all the relevant folders for servers and applications you’ve accessed
- workspace.metadata.plugins/org.eclipse.ui.workbench has settings for various dialogs, plus the critical file workingsets.xml. This looks like it has the configuration for the working sets themselves and points to paths of relevant files. I copied the whole folder.
- workspace.metadata.plugins/org.eclipse.core.resources has the projects referenced in the workingsets.xml. The whole folder is required. The .location files in each project point to the location using a URI relative to JNSF, which I suspect is the workspace folder
- workspace.metadata.plugins/com.ibm.designer.domino.ide.resources has a file that maps the projects to the actual servers
Copy those into a clean install, and you have “working” working sets in a few seconds.
I then chose to manually install all the additional plugins, but those appear to be in workspace.configorg.eclipse.update. To get the list of locations I had previously used in Domino Designer, I just copied a backup of bookmark.xml into that folder.
Monday 29 June 2015
Domino Client Certificate authentication (web services consumer/provider)
Short description of problem and requirements:
Required to provide SSL Client authentication for IBM/LOTUS Domino users and other remote systems.
Integrate web services without storing username/password for Web Service connections consumers/providers or providing anonymous access.
Problem resolution example:
1) In Domino server document for SSL authentication options must set Client Certificate to "Yes".
How domino recognizes connecting client with certificate. It searches address book for matching user/server with corresponding mapped certificate.
Web Service provider - uses standard authentication - user must send client certificate to server. If this type of authentication is enabled, then there should be no problem.
Web Service consumer - using IBM Notes consumer we should set SSL option for connection, that Client Certificate must be sent and for this purpose additional option must be set before connecting Setssloptions(NOTES_SSL_SEND_CLIENT_CERT).
Where are the benefits?
You can build SOA based applications and integrate Lotus Applications with Web Services, so it could be later exposed to other applications.
Possible scenario:
1) Create Web service, that approves some document.
It could be used by:
a) Notes client - create internet certificate for user and import in notes ID. Approved document from LN Client.
b) Same Domino server with Client certificate authentication enabled (no username/password required). Server side scripts.
c) Web browser client - if server uses username/password authentication - user already authorized for operation.
d) External applications - create new user in address book, create client certificate, integrate.
Required to provide SSL Client authentication for IBM/LOTUS Domino users and other remote systems.
Integrate web services without storing username/password for Web Service connections consumers/providers or providing anonymous access.
Problem resolution example:
1) In Domino server document for SSL authentication options must set Client Certificate to "Yes".
How domino recognizes connecting client with certificate. It searches address book for matching user/server with corresponding mapped certificate.
Web Service provider - uses standard authentication - user must send client certificate to server. If this type of authentication is enabled, then there should be no problem.
Web Service consumer - using IBM Notes consumer we should set SSL option for connection, that Client Certificate must be sent and for this purpose additional option must be set before connecting Setssloptions(NOTES_SSL_SEND_CLIENT_CERT).
Where are the benefits?
You can build SOA based applications and integrate Lotus Applications with Web Services, so it could be later exposed to other applications.
Possible scenario:
1) Create Web service, that approves some document.
It could be used by:
a) Notes client - create internet certificate for user and import in notes ID. Approved document from LN Client.
b) Same Domino server with Client certificate authentication enabled (no username/password required). Server side scripts.
c) Web browser client - if server uses username/password authentication - user already authorized for operation.
d) External applications - create new user in address book, create client certificate, integrate.
Monday 15 December 2014
Copy/Paste from applications to Notes into text fields (international characters)
The problem (sample with cyrilic symbols):
I had a very interesting problem with copying data, which contained international characters, from Microsoft office applications to Lotus Notes. So if you copy/paste into RichText field, there is workaround, that it could be pasted as plain text, but when you try to paste into Notes style text field, there is no options to do that. Using Lotus Notes e-mail, I've noticed, that copy/pasting into Native OS Style fields works well. So the workaround for that type of problem is to create form with one Native OS style field and add PostOpen event, which pastes data into that field, than copies that data again and closes the form. As a result, clipboard will contain correct data, to paste into Notes style field
You can create simple hotspot near the required field, which opens form with one field and then pastes resulting data in target field.
I had a very interesting problem with copying data, which contained international characters, from Microsoft office applications to Lotus Notes. So if you copy/paste into RichText field, there is workaround, that it could be pasted as plain text, but when you try to paste into Notes style text field, there is no options to do that. Using Lotus Notes e-mail, I've noticed, that copy/pasting into Native OS Style fields works well. So the workaround for that type of problem is to create form with one Native OS style field and add PostOpen event, which pastes data into that field, than copies that data again and closes the form. As a result, clipboard will contain correct data, to paste into Notes style field
You can create simple hotspot near the required field, which opens form with one field and then pastes resulting data in target field.
Tuesday 22 July 2014
Lotus Outline BUG
Found interesting bug in Lotus Notes, when outline is embedded in form and in some cases disappears from UI.
Simple experiment to reproduce the problem.
1) Create form
2) Create outline
3) Add button to form with code like @SetField("SomeField";"12345") or call ws.currentdocument.document.replaceitemvalue ("SomeField","1111")
4) Add outline to form
5) Save form.
Close Lotus Notes and delete cache.ndk from data directory.
Run Lotus Notes. Open created form in Lotus Notes client. Push the button - voila! Outline disappears!
Next time You open same form and push the button - it works fine (outline is in place).
The main problem is that, this only happens with non-cached outlines in cache.ndk. If You have 2 replicas on multiple servers, then opening each replica and pushing then button reproduces the problem again and again (possible recache for each replica?).
Workaround for this issue is, that You could use some form with all outlines included and loaded before main form - "cache" init form - it should load first, then the working form.
P.S. notes 7.0.3 has this bug I haven't found any workaround for it, but in 7.0.4 and 8+ works fine with cache form.
Simple experiment to reproduce the problem.
1) Create form
2) Create outline
3) Add button to form with code like @SetField("SomeField";"12345") or call ws.currentdocument.document.replaceitemvalue ("SomeField","1111")
4) Add outline to form
5) Save form.
Close Lotus Notes and delete cache.ndk from data directory.
Run Lotus Notes. Open created form in Lotus Notes client. Push the button - voila! Outline disappears!
Next time You open same form and push the button - it works fine (outline is in place).
The main problem is that, this only happens with non-cached outlines in cache.ndk. If You have 2 replicas on multiple servers, then opening each replica and pushing then button reproduces the problem again and again (possible recache for each replica?).
Workaround for this issue is, that You could use some form with all outlines included and loaded before main form - "cache" init form - it should load first, then the working form.
P.S. notes 7.0.3 has this bug I haven't found any workaround for it, but in 7.0.4 and 8+ works fine with cache form.
Friday 2 November 2012
Lotus Notes. Getting user HOME on MACINTOSH
I had run in problem building application for MACINTOSH in LN. It was required to install some user files for regular use and it should be installed in user home directory. So then problem was, that Lotusscript does not gives user home directory location using Environ, or NotesSession.getEnvironmentString.
First my attempt were to execute shell like "env > /tmp/userenv.txt" and then read the file, parse and get HOME directory from file - I don't like this, because You need to create a file on disk.
Second attempt were to search for dll containing standard C function getenv, which must return environment variable by specified name. So the library found is "libSystem.dylib" and resulting declaration in LS library, agent {Declare Function mac_getenv Lib "libSystem.dylib" Alias "getenv" (ByVal varnameAs String) As String}, so call mac_getenv("HOME") and voila!
First my attempt were to execute shell like "env > /tmp/userenv.txt" and then read the file, parse and get HOME directory from file - I don't like this, because You need to create a file on disk.
Second attempt were to search for dll containing standard C function getenv, which must return environment variable by specified name. So the library found is "libSystem.dylib" and resulting declaration in LS library, agent {Declare Function mac_getenv Lib "libSystem.dylib" Alias "getenv" (ByVal varnameAs String) As String}, so call mac_getenv("HOME") and voila!
Subscribe to:
Posts (Atom)