Home > Ask the Domino Experts > LotusScript Questions & Answers > Creating and saving a $Links field in the back end
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Creating and saving a $Links field in the back end

Cregg Hardwick EXPERT RESPONSE FROM: Cregg Hardwick

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 23 August 2006

I use the rtitem.appenddoclink method in LotusScript. How can I create and save a $Links field in the back end?

Readers should be able to trigger doc updates via an agent that runs on the Lotus Domino server. It works fine until you reopen the doc without running the script (the script shouldn't be run if nothing has changed in the source database). The doclinks are then lost and converted to dblinks, because the $Links field was never created and saved in the Unique Identifier after the LotusScript agent was run.

Can you please help me solve this?


>
EXPERT RESPONSE

I would have to see your code to understand what you are trying to do. You cannot create a $Links field directly. This is a reserved field that is created by Lotus Notes when you add doc links to a rich-text field.

It's not clear why this process is not working, nor why the doclinks are "Converted to dblinks". I don't recall having experienced that behavior. The only way I have seen AppendDocLink fail either raises an error at runtime, when the user clicks the link, or both.

So without seeing your LotusScript code, I can only point out the following caveats:

  • Make certain that both Lotus Notes databases have a default form and view. doclinks can fail in a number of ways if this is not true.

  • Prior to Lotus Domino R7, no changes to a rich-text field are visible in the UI until the document is saved, closed, and reopened. I doubt this is an issue here.

  • Verify that the "linkto" object you are passing to the AppendDocLink method is, in fact, a document. Since I have never seen a link fail in any way that does not raise an error, my guess would be that your LotusScript agent has a bug and is linking to the Lotus Notes database instead of the intended document. Because the method is not type-safe, this wouldn't raise any alarm bells.

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from SearchDomino.com:

  • Learning Guide: LotusScript
  • FAQ: LotusScript
  • Reference Center: LotusScript tips and resources


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    LotusScript
    Debug Lotus Notes documents using extracted data
    Extracting attachments from a Lotus Notes rich-text field
    Programmatically replace the design of Lotus Notes databases
    Reading a binary field in an Oracle database with LotusScript
    LotusScript equivalent of @Picklist for Lotus Notes
    Launch large attachments within an email from a Notes database
    How to find files on a hard drive or mapped network with LotusScript
    Update the ACL from the Roles view with LotusScript
    LotusScript agent moves tagged spam email to junk mail folder
    Set a value in a field existing in another Lotus Notes database

    LotusScript
    Modifying LotusScript code for date and time handling
    Use DXL utilities for advanced replication settings in Notes
    Use LotusScript to create encrypted replicas
    Write a LotusScript agent to automate file attachments
    Troubleshooting a scheduled agent not running on a Global Notes Architecture (GNA) server
    Setting up local replication of a Lotus Notes database for offline employees
    Creating a link on an HTML page to a Microsoft Word attachment in a Lotus Notes database
    LotusScript to extract and move attachments to a Lotus Notes mailbox or file folder
    Copying a rich-text field with attachments to a Lotus Notes document
    How to convert Lotus Notes documents to .PDF files

    Lotus Notes Domino Agents
    Verify scheduled agent status with Domino Extensible Language (DXL)
    Top 10 Lotus Notes Domino programming and development tips of 2007
    How to export data from a Lotus Notes database to a CSV file
    Must-know Lotus Notes Domino agents -- 10 tips in 10 minutes
    Enable or disable scheduled agents without opening the Lotus Notes database design
    Creating custom views in Lotus Notes databases
    Editing fields in a Lotus Notes view with Ajax
    Troubleshooting a scheduled agent not running on a Global Notes Architecture (GNA) server
    Can I stop Lotus Domino Server from transforming embedded images into attachments?
    How to automatically create a backup copy of your Domino Directory

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice

    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts