Shared Action Confusion in Notes

My co-worker, Virginia Tauss, just ran across the most annoying thing in an “Old Notes” database. The database has a number of Shared Actions, some of which are used on forms and views that are inherited explicitly from one of our templates. In our system, each of the projects we support gets a database to manage their project, built off a base design, then modified to meet their needs. Thus, the database does not inherit it’s entire design from the template. In fact, there are some design elements that are drawn from a second template (our Field Operations Manual has several forms and views that are used in all databases).

In my recent design changes, I started using Shared Actions in the Field Operations Manual design, for all the reasons everyone likes Shared Actions – code reusability, simplicity and space savings.

Unfortunately, when a form or view inherited from the Field Operations Manual uses a Shared Action, the inheriting database would not display the same action as had been designated in the template.

Shared Actions rely upon something called a ‘share-id’, which has nothing to do with the name of the action, the order in which it appears in the list of actions in the database or the Note ID of the design element. That is to say, unique to each implementation, rendering Shared Actions far less useful in our multi-template inheritance environment.

From the IBM TechNote

This issue is related to how Shared Actions are referenced. They are not referenced by Note ID, by name, or by their order in the Shared Actions list. They are referenced by a property called ‘share-id’. If a Shared Action is copied to another database the share-id for the action is not necessarily preserved. The issue typically occurs after a design element is updated and the design of the database is refreshed.

Needless to say, this was an eye-opener. I’d never had databases using multiple templates before and hadn’t a lot of experience with Shared Actions in templates. One of my friends, Greg Ehrig, was a ski instructor at one point and he always said, “If you aren’t falling down, you aren’t learning.” Notes and XPages give us all plenty of chances to fall down, so plenty of chances to learn!

Advertisements
Categories: Old Notes | Tags: , , , | 2 Comments

Post navigation

2 thoughts on “Shared Action Confusion in Notes

  1. g2-99fb011bce1970faa1e6cad0063d186d

    My first advice: Switch on “multi-language database” property in the design properties of the application. You don’t need to select a language or region, you make your “cross”.

    After that, when you open the database in the Domino Designer and go to the Shared Actions, you’ll have a new (last) column: the ID of the shared action.

    When you open a shared action, you can even change the ID in the Shared Action’s properties (dialog box). But if you have some design elements with this Shared Action, the id reference in those isn’t updated, thus they get a kind of orphans.

    Second tip: create a lot of shared actions (copy and paste helps) and delete them to increase the ID assigned to new Shared Actions to a higher number, lets say 100.

    Now you can set the ID of the Shared Actions you want to have to a lower number without the risk of creating a new Shared Action with the same ID later on (you really, really don’t want to have multiple Shared Actions with the same ID! NEVER! AVOID! DANGER! I’M NOT KIDDING!) 🙂

    Third tip: Make sure that the same Shared Action has the same ID in each and every application. Thus you can simply copy and paste design elements like forms and views and their Shared Actions are kept valid references
    .

    Bonus tip: Put your “I have these actions in really every app”-Shared Actions to fixed IDs in a certain range (e. g. 1-19), the application-specific “New” actions in another (20-29), etc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: