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

Discussions

Ask a Question

Query Service API Call Not Getting Data

Hello, In a recent Tech alert there was mentioning of a deprecation of the IQA service in the API and a switch was being made to a new QueryService endpoint that was being developed. I am trying to use that new endpoint to get data from an IQA via the API. I have read the tech alert and have tried to follow it as best I can, but I am not receiving any feedback as to if I am hitting the endpoint at all. I am using Postman for now before moving it into my code. Note: the specific version of the cloud hosted iMIS is: 20.3.69.27972. Also, I will find a way to attach screenshots to this question it is letting me currently when trying to post this. It is mentioned that we must POST to the query service endpoint and pass any parameters to the query in the body of the request. I need a bit more clarification on how this process works because what I am trying is just either giving me no data in return or a message telling me to contact the administrator. So, please allow me to lay out everything. I have an IQA I made, there are two optional parameters that can used. They ARE defined in the IQA itself. This IQA queries and joins the Contact and Activity tables. The two filters/parameters I have setup are for the Activity's Category property and the Contact's iMIS ID property. Keep in mind these are optional parameters, how would I go about passing these in to the endpoint. I have seen in the screenshots they are passed via the parameters and the body? What if they are optional and nothing is passed in? Do they parameters need to account for that or can they be left blank? The same type of question can go for the body of the request as well. Do I need to account for optional parameters? How would that look? Right now, this is what the body of the request looks like: { "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts", "EntityTypeName": "QueryService", "OperationName": "FindByPath", "Parameters": { "$type": "System.Collection.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib", "$values": [ { "$type": "System.String", "$value": "$/AGCS/Activity CEU by Category and ID DB Test" } ] } } Again, I see how it's done in the tech alert, but I really need some clarification here because I am not getting any results back. Thanks!
ANSWERED

API Table Access Question

Hello, I have a question regarding table access with the API. A team member mentioned recently that ASI was planning on restricting read and write privileges to tables directly. One of the tables in question is the Activity table. I think he said he got this information from a posting that was made, but I cannot locate that. So, my question is will there be a new way you want us to access these tables? Is there a link to any posting that go over these details? What tables will this affect, i.e. I notice the current API reference that is on this site, does not contain information on how to access tables such Activities, I had to find out how to do that in these Discussions, which is fine, but I would like some clarification on this. Thanks, Dustin Branch
ANSWERED

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.Collection`1[[System.String, mscorlib]], mscorlib", "$values": "34389" } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Party", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection`1[[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
ANSWERED

REST API Unsupported Grant Type

Hello, I am trying to request a token so that I can make requests to our instance's API. This is a demo instance of iMIS for our testing purposes. I am getting an error whenever I try to get a token that says the grant type I am passing in is unsupported. I pass it just as the documentation says. "grant_type" : "password" I am pretty sure I am trying to access the correct endpoint, I have my: https://domain.com/token (https://demo.a-gcs.com/sp/token) what it is actually. I have seen other questions posted adding a "/Asi.Scheduler_XXXX/token" but I am not sure if this is needed for me. How would I go about finding if it was needed, and if it is needed where do I find the information for the XXXX I assume this is some sort of version number? Our demo instance's version is 20.2.65.9914. I do also want to note I have this request for the token setup in JavaScript and I am using the same jQuery example found here: https://developer.imis.com/reference/bearer-token I am testing on both the demo site and Postman. The site refreshes a little too quick for me to see other than 400 level error, but in Postman all I get back from a response is {"error" : "unsupported_grant_type"} Finally, here is the exact URL I am using. I removed my username and password, but they are there on my end. https://demo.a-gcs.com/sp/token?grant_type=password&username=******&password=******* Hopefully that gives you a better picture of my issue. I tried to lay out everything I could. Thanks for any assistance you are able to provide!

"An item with the same key has already been added" - whilst editing event rego

I am editing an event registration to add a new function to the registration. When the original registration takes place, a default function is registered automatically. So registrant has Event TEST1, Fns: DEFAULT Then in a 2nd transaction, function A is added to the registration with a forced price of $1.00. All good. Event TEST1, Fns: DEFAULT, A Then in a 3rd transaction, function B is added to the registration with a forced price of $1.00. All good. Event TEST1, Fns: DEFAULT, A,B Then in a 4th transaction, function C is added to the registration with a forced price of $1.00 *Exception: An item with the same key has already been added* There is nothing different about this function and any subsequent function I try to add once I'm at this stage, it always fails with the same error. Anyone know why? ``` An item with the same key has already been added. System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item) at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item) at Asi.Soa.Core.DataContracts.GenericPropertyDataCollection.Add(String propertyName, Object value) at Asi.Soa.ClientServices.EventManager.SetFunctionRegistrationStatusViaCart(EventFunctionData function, EventRegistrationStatusData currentRegistrationStatus, EventRegistrationStatusData newRegistrationStatus, String registrantPartyId, String payorPartyId, Boolean isAdjustment, String adjustmentOriginalInvoiceId, String adjustmentFunctionInvoiceId, Int32 originalQuantity, Uri websiteEditUrl, Int32 quantity, Boolean onWaitList, Boolean removeFromFunctionWaitlist) at Asi.Soa.ClientServices.EventManager.SetFunctionRegistrationStatus(String payorPartyId, String registrantPartyId, String eventFunctionId, EventRegistrationStatusData status, Uri websiteEditUrl, Int32 quantity, Boolean onWaitList, Boolean removeFromFunctionWaitlist) at Asi.Soa.ClientServices.EventManager.RegisterFunction(String registrantPartyId, String eventFunctionId, Int32 quantity) ```

HTML editor field

We need an html editor field for staff input. I first created the field as part of a panel source but can't then edit it within Business Objects to set the field to html editor. I can use the panel as the source for a BO so I can set the field to html editor but how do I then create a page based on the BO so that staff can add records? I can't get the BO to show up as an available source at Panels and I'm not finding a content type to display a BO on a page. Help is appreciated!

ClientSide/Javascript iPart response to Command bar

Hi, How can I get a client side iPart to respond to the 'Save' button in the command bar or to a button click in a Content Collection? In ascx iPart we can override the Commit() function, but that's not available client side. Is there an equivalent client side functionality? Thanks.

CLient-Side iPart Settings

When creating a client-side iPart, if you have configuration values you want to have an option to set from the staff side, do those have a way of binding back to the iPart when being displayed back out to the public end user, or do we have to call the REST API to get that data? Want to have settings configured on staff side and use those settings to do certain things with the iPart on the public side.

Update trans that gl has exported

Hi, Is it possible to update trans or make a request to some endpoint that records transactions have been exported to the GL? Kind regards, Julie
ANSWERED

REST POST to multi-instance user defined tables always return a 0 for Ordinal

Any updates on this item https://support.imis.com/hc/en-us/articles/360028716612-16053-ZD-98447-REST-POST-to-multi-instance-user-defined-tables-always-return-a-0-for-Ordinal