This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Fire Template from Code

How can I fire a template from code.

dbObject.ExecuteTemplates() does nothing.

I know there is this a way with sql (exec vid_InsertForHandleObject_0 'ExecuteTemplates', 'Person', '', @ProcID=newid) but I do not want to call sql from code, it should actually be possible from code directly?

Parents
  • Nope, this doesnt work in script tester, event with save after the method call:

    Public Function Q1C_TestExecuteTemplate() As String
    Dim dbPerson As ISingleDbObject
    dbPerson = Connection.CreateSingle("Person", "44f5ea7a-10e2-463b-b74e-0f629a0edf7b")
    dbPerson.Load()
    dbPerson.ExecuteTemplates()
    dbPerson.Save()
    Return ""
    End Function
Reply
  • Nope, this doesnt work in script tester, event with save after the method call:

    Public Function Q1C_TestExecuteTemplate() As String
    Dim dbPerson As ISingleDbObject
    dbPerson = Connection.CreateSingle("Person", "44f5ea7a-10e2-463b-b74e-0f629a0edf7b")
    dbPerson.Load()
    dbPerson.ExecuteTemplates()
    dbPerson.Save()
    Return ""
    End Function
Children
No Data