• Action: Create

    By Herr Vorragend 2 decades ago

    I am using the create-action directly after creating a new doc. (@IsNewDoc).



    The document wasn't saved before, because it is a new doc with status 'draft'.



    So some own action-scripts are not working, because they need a previosly saved document. (I compose a new response-document with an OLE-object embedded and the parent-fields are not shown in the embedded reponse-doc. - Notes/FX)



    I have to change the create-script in 'CustomStdActions' to the following:



    Sub Click(Source As Button)

    Dim uiws As New NotesUIWorkspace<br/>
    Set uidoc =ws.CurrentDocument<br/>
    If uidoc.EditMode Then<br/>
        Call wfFormActionSave ()        <br/>
    End If<br/>
    Call wfFormAction (MODE_CREATE)<br/>
    

    End Sub



    I don't really want to 'hack' core-files :-)



    Do you have another idea? Or do there already exist a save-before-create-feature? :-)



    Thank you

    • validation

      By Mark Demicoli 2 decades ago

      Herr, one way would be to create a Validation which checks if the current document is new and if it is not, then alert "Please save this document before attempting to create …. "



      …IF this is acceptable to your users??! :)