Issue with a!deleteFromDataStoreEntities through SAIL interface: Not able to delete data

Hi All,

I have a requirement to delete user selected data from a drop down field. And for that I am using a!deleteFromDataStoreEntities in SaveInto of a dynamiclink field. While doing so, I am getting some issue as below:

Seems like some DELETE rights were not granted to user, The user whoever logs in can able to delete that he/she has in his dropdown list. 

15:24:03,259 INFO  [stdout] (ajp-/0.0.0.0:8009-25) 2018-01-11 15:24:03,259 [ajp-/0.0.0.0:8009-25] ERROR org.hibernate.util.JDBCExceptionReporter - DELETE command denied to user 'appian'@'172.30.0.1' for table 'PRS_FILTER_PU'
15:24:03,268 INFO  [stdout] (ajp-/0.0.0.0:8009-25) 2018-01-11 15:24:03,264 [ajp-/0.0.0.0:8009-25] ERROR com.appiancorp.expr.server.reaction.smartservicebridge.SmartServiceBridgeReaction - Exception occurred during activation of ReactionFunction {key='sys.smartService.delete-from-data-store', class='com.appiancorp.expr.server.reaction.smartservicebridge.PluginSmartServiceBridgeReaction'}
15:24:03,268 INFO  [stdout] (ajp-/0.0.0.0:8009-25) com.appiancorp.suiteapi.common.exceptions.AppianException: An error occurred while trying to delete data. No data was deleted. Details: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update [entity name=PRS_FILTER_PU, id=2]. (APNX-1-4212-000)


  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    Based on the error, it seems like the database account associated with the JDBC connection does not have the appropriate privileges. If this is an on-premises installation, the rights for "appian" should be reviewed with a DBA. If Appian Cloud, I find it unlikely there is an issue with the database user specifically, but you would be able to confirm by going to PhpMyAdmin and verifying.

    The other thing I would check is make sure the process user (i.e. task owner) has access to the datastore via the role map.

    Have to you tried deleting this data using the smart service in process instead of the a!delete() function? I'm curious if you get the same error.

    Also, if you can provide any snippets of the interface and how you are executing the saveInto, that might be helpful as well.