These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
Back to All

Updating a Specific Activity Record Error

Hello,

I am trying to update a specific Activity record with a PUT request via the API. I have been looking at these two links very closely for examples on grabbing the Activity records and updating them. Links:

https://developer.imis.com/discuss/5b4649c03dcb6a0003c6dc54
https://developer.imis.com/discuss/5cca0ad42cc796000ebe87af

However, in my attempts to update an Activity I am getting an error with the PartyId I am trying to send in. I have confirmed that the PartyId is tied to the correct Activity I am looking to update it with. So perhaps this is just a matter of how I am passing the PartyId in. The exact error message I get back as a response is:

"The PartyId (null) is not valid."

The exact endpoint I am using is this: https://demo.a-gcs.com/sp/api/Activity-CEU/34389

Please note the 34389 is the sequence number on the Activity. The /sp is required for our URL it is just the demo site is hosted for us. Finally, I know in the above link on updating an Activity record says to just use /Activity, however, this did throw me an error so adding the -CEU to the endpoint got rid of it.

Before implementing this in code I am using Postman to test first. I am trying to pass the PartyId as a Parameter to the request but that does not seem to help. The PartyId is also in the Body of the request. Here is what that looks like:

{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "Activity-CALL",
"PrimaryParentEntityTypeName": "Party",
"Identity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "Activity-CALL",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib", "$values": "34389" } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Party", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib",
"$values": "20392"
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "SEQN",
"Value": {
"$type": "System.Int32",
"$value": "34389"
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Category",
"Value": "1CCR"
}
]
}
}

I appreciate any insight you can provide into how I should pass this PartyId to the endpoint.

Thanks,
Dustin Branch