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

ObjectKeyAssignment@PersonWantsOrg is not populated at time the request is approved (event: Granted)

Hello,

I have a custom process to be fired by the event Granted from PersonWantsOrg. The process need to do something else with the value of "ObjectKeyAssignment" when the request is approved in ITShop. However the "ObjectKeyAssignment" had no value populated yet at time the custom process was fired by the event "Granted".

Is there a way I may capture the value of "ObjectKeyAssignment" in the request approval when the event Granted occurs? Or other workarounds? It is v7.0.2.

Thank you!

Parents
  • I did some testing in my version and PersonWantsOrg.ObjectKeyAssignment was always filled in my 7.0.2 environment.

    The reason for not getting the CustomProperty01 value of your requested Org Membership is, that the Membership does not exist at the time the GRANTED event is fired. Means, your code to get the UID_Org is not working because your are using the non-existing membership to get the UID_Org,

    Instead use the following code to fetch the CustomProperty01 from the Org you are requesting the membership for:

    Dim dboKeyOrg As DbObjectKey = New DbObjectKey($FK(ObjectKeyOrdered),QERAssign.ObjectKeyAssignTarget$)

    values("CP01") = Session.GetSingleValue(of String)(dboKeyOrg,"CustomProperty01")

    You will find some more sample about how-to use the object layer in the script samples on the product delivery in the folder "Modules\QBM\dvd\AddOn\SDK\ScriptSamples".

Reply
  • I did some testing in my version and PersonWantsOrg.ObjectKeyAssignment was always filled in my 7.0.2 environment.

    The reason for not getting the CustomProperty01 value of your requested Org Membership is, that the Membership does not exist at the time the GRANTED event is fired. Means, your code to get the UID_Org is not working because your are using the non-existing membership to get the UID_Org,

    Instead use the following code to fetch the CustomProperty01 from the Org you are requesting the membership for:

    Dim dboKeyOrg As DbObjectKey = New DbObjectKey($FK(ObjectKeyOrdered),QERAssign.ObjectKeyAssignTarget$)

    values("CP01") = Session.GetSingleValue(of String)(dboKeyOrg,"CustomProperty01")

    You will find some more sample about how-to use the object layer in the script samples on the product delivery in the folder "Modules\QBM\dvd\AddOn\SDK\ScriptSamples".

Children
No Data