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

Move forward a request (personWantsorg) throught the approval workflow by script

Hi all,

I'm in a migration step from old system to 1IM where I have all requestd with their approval workflow in the old system.

I'd like to update the status of the request created with the approval workflow step where they are in the old system ( I have custom precessing status) is it possible? How can I achieve this with script?

Parents
  • I try this script too

    Dim pBag As New PropertyBag
    ' assign all required fields
    pBag.PutValue("ObjectKeyOrdered", "<Key><T>UNSGroupB</T><P>87818304-b6b8-4d8b-898a-881ed18003cf</P></Key>")
    pBag.PutValue("UID_PersonInserted", "cbf1bf27-09a8-48cc-a2b6-175d934025b3")
    pBag.PutValue("UID_PersonOrdered", "cbf1bf27-09a8-48cc-a2b6-175d934025b3")
    pBag.PutValue("OrderState", "OrderProduct")
    'Dim dbPwO As ISingleDbObject = Connection.CreateSingle("PersonWantsOrg")
    RaiseMessage(MsgSeverity.Info, "Before")
    dbPwO.Custom.CallMethod("FillOrder", pBag)
    RaiseMessage(MsgSeverity.Info, "pwo id generated " + dbPwo.GetValue("uid_personwantsorg").ToString)
    dbPwO.Save
    End Sub

    I get the UID in the log but when I looking for it in the personwantsorg table I can't find it

    then i try to save the object dbpwo and I get the following error:

    PersonWantsOrg: The following fields are compulsory and need to be filled: Product
    I need to insert a request for a unsgroupB object published in IT SHOP
Reply
  • I try this script too

    Dim pBag As New PropertyBag
    ' assign all required fields
    pBag.PutValue("ObjectKeyOrdered", "<Key><T>UNSGroupB</T><P>87818304-b6b8-4d8b-898a-881ed18003cf</P></Key>")
    pBag.PutValue("UID_PersonInserted", "cbf1bf27-09a8-48cc-a2b6-175d934025b3")
    pBag.PutValue("UID_PersonOrdered", "cbf1bf27-09a8-48cc-a2b6-175d934025b3")
    pBag.PutValue("OrderState", "OrderProduct")
    'Dim dbPwO As ISingleDbObject = Connection.CreateSingle("PersonWantsOrg")
    RaiseMessage(MsgSeverity.Info, "Before")
    dbPwO.Custom.CallMethod("FillOrder", pBag)
    RaiseMessage(MsgSeverity.Info, "pwo id generated " + dbPwo.GetValue("uid_personwantsorg").ToString)
    dbPwO.Save
    End Sub

    I get the UID in the log but when I looking for it in the personwantsorg table I can't find it

    then i try to save the object dbpwo and I get the following error:

    PersonWantsOrg: The following fields are compulsory and need to be filled: Product
    I need to insert a request for a unsgroupB object published in IT SHOP
Children
No Data