PDA

View Full Version : API Save not working in Powershell


sam.otago
May 2nd, 2018, 04:24 PM
I have a Powershell script that connects to the CommitCRM database using the API. It connects fine, I can retrieve data and edit properties. Even when I run the Save command, it seems to run without error. But the data is not being updated in the database.

Support Team
May 3rd, 2018, 06:04 AM
Thank you for posting this.

It is hard to tell what exactly the problem is. Do you retrieve data using ODBC and try to update using the programming API? Or is it that you try to use the programming API for both querying the data and updating it?

Please verify that your application uses the latest DLL files that are found under \RangerMSP\ThirdParty\UserDev\ folder.

Is there any specific error message or return code that you see?

You can email us the log files and we may probably find more information there. You can use the Help > Technical Support in RangerMSP and Outlook to send the log files or zip the folder \RangerMSP\Logs and email it to us.

Hope this helps.

sam.otago
May 3rd, 2018, 05:44 PM
Thanks.
I am using an ODBC connection to retrieve a list of the Assets, then using the API to find the right asset and update it.
In the config object, I am pointing the property CommitDLLFolder at the UserDev folder, so presumably that means it uses the correct DLL.
There is no visible error, and the Save seems to run fine, it just doesn't change the data in the database.

I have e-mailed the logs through, as requested.

Support Team
May 4th, 2018, 06:00 AM
Thank you. We received the log files and while we can't say that the following will definitely resolve it, it may definitely help.

The application name that is passed as a parameter to the API is SAM'S SCRIPT
Please change it so the name does not include an apostrophe character and give it another try.

Hope this helps.

sam.otago
May 7th, 2018, 09:35 PM
That seems to have sorted it. Thanks.