Method to delete the effective date in a document that is in the preliminary state

I have a document in preliminary state that has an effective date and I need to delete it (preliminary documents should not have an effective date until it is released). 

Please give me a C# server method that will delete the effective date in this Preliminary document.  It is a controlled document.  I do not know how to write in C# but I do know how to copy your method into a new method, create the document action and add it to the document item type.

Your help is greatly appreciated.

-Don

Parents
  • Hi Don

    ARAS OOTB by default, set the effective date when the item is getting released and it will set to null when the new revision preliminary revision is created. If your instance is working in that way, then you can correct the existing item but using the below AML query

    <AML>
    <Item action="edit" type="Document" id ="ID of the version you want to update" version="0">
    <effective_date condition="is null"></effective_date>
    </Item>
    </AML>

    else, create a method and attach to the document item (onBeforeVersion)

    if(this.getProperty("state") == "Preliminary")
    {
    if(!string.IsNullOrEmpty(this.getProperty("effective_date","")))
    {
    this.setProperty("effective_date","");
    this.setPropertyCondition("effective_date","is null");
    }
    }
    return this;

  • 0 オフライン in reply to Gopikrishnan

    Thank you so much for your help!

    -Don

Reply Children
No Data