Hi all,I’m in the process of customizing the StdR7Mail template to add in-house features using Designer.
I am wondering if it would be possible to make all these modifications programmatically, i.e. by creating an external application that would open a template and modify it as I want using API calls. That would be helpfull because I would prefer insert my modifications into the existing templates instead of overwriting them.
In other words, is there any API that is powerful enough to modify a database design the same way one can do manually using Designer ?
You can use different API to do a such application. It is possible to create a C++ Dll that will be interfaced using a Lotus Notes application. You should download the C++ API DSK and the documentation concerning this API in order to develop an application. There are a lot of examples that are provided by IBM to perform such operation.
It is also possible to develop an application using the C API, bu it appears to me to be a bite more complicated.
This is a list of class that might be usefull for you from C++ toolkit:
I don’t know of any external API that can make those kind of changes, but I’m not a C API guru by any means. Lotus does provide a C API toolkit that you can reference, so it might be worth looking at.
If you want a native Notes solution you have three options, any of which can be run in a scheduled agent. First would be to use design inheritance to push your changes, but you might consder that to be overwriting. I typically use a subform to hold my modifications, but there are times when you need to change something that is built in.
If you just want to replace the existing design elements with your modfications you can use a NotesNoteCollection, delete the old design Notes, and insert your own.
If you want to actually modify the design and not replace anything, the approach you want to take is to use Domino XML, also known as DXL. You can use DXL to export a design element as XML, modify it, then push it back into a database. Just be aware that not all properties are exposed via DXL. Domino Designer help does a pretty good job of listing which ones are supported.
You understood exactly what I want to do.Replacing the template design to another file is what I consider overwriting, so I will look into NotesNoteCollection and DXML.
I think that you should be careful using DXML to update the Mail template. I performed a few tests on it using the DXLM import and export from Lotus Designer and I was not able to import correctly the deisgn of the folder ($Inbox) and the form “Memo” with out even doing any modification in them. So before starting coding an application you should verify that the Notes items that you want to update in the template have a valid structure, you might be surprised by the result you ll get.