Interface Definition: Expression evaluation error [evaluation ID = XVWQ7PGA] : An error occurred while executing a save: Expression evaluation error : Attempted to run a second smart service, but only one smart service can be run per expression evaluation.
Discussion posts and replies are publicly visible
Can you explain your use case for executing 2 smart services at the same time? There may be other work-arounds depending on what you are trying to accomplish. For example, if you are trying to write to two different database tables, you can use the a!writeToMultipleDataStoreEntities() instead of a!writeToDataStoreEntity().
Peter Lewis if i need to use a!a!writeToDataStoreEntity() and a!deleteFromDataStoreEntities()
...then your best bet is to start a process to achieve this as you can run both of these in sequence or in parallel as requirements dictate.
Agreed with Stewart - a process is probably your best bet.
The one other way I've done this is to do a different kind of delete. Often, when I "delete" data I want to hide it from users but not delete from the database because that will permanently remove the data. So, I create an extra boolean column in my CDT called "isDeleted" or something like that. Now, whenever I want to delete a row, I actually just change the value of the isDeleted field to true. Since this no longer requires a delete (only writeToDataStoreEntity()), you can now do this all in the same transaction.
All that being said - if you already have it set up to delete from the DB, you probably don't need to change it. This is just food for thought in the future