Old Value from SingleDbObjectSnapshot

When using the following, the OLD and NEW Values are the same in the XML even though they have changed:

This is what I have on the Pre-script for generating and the event is UPDATE

Dim dbPerson As ISingleDbObject = Connection.CreateSingle("Person", $UID_Person$)

Dim personXML As String = New SingleDbObjectSnapshot(dbPerson).ToXmlString(True)


values("personXML") = personXML

I am trying to get the old value out in a script that is generated when there is an UPDATE on Person, but it's not working.  Can someone please suggest what I am doing wrong?

Parents
  • You are loading a Person object from the database with the Connection.CreateSingle("Person",$UID_Person$) statement.

    Drop this statement and use this statement instead (assuming your process is running on the Person.Update event).


    Dim personXML As String = New SingleDbObjectSnapshot(Base).ToXmlString(True)
    
    values("personXML") = personXML



Reply
  • You are loading a Person object from the database with the Connection.CreateSingle("Person",$UID_Person$) statement.

    Drop this statement and use this statement instead (assuming your process is running on the Person.Update event).


    Dim personXML As String = New SingleDbObjectSnapshot(Base).ToXmlString(True)
    
    values("personXML") = personXML



Children