You need to sign in to do that
Don't have an account?
Trouble running DML statements
Up to now I haven't been able to run dml statements that are not textbook examples. My current error message is
bvdep:DML currently not allowed
An unexpected error has occurred. Your development organization has been notified.
where bvdep is the namespace I assinged for my managed package. The testmethod that executes the same code works ok (I insert the record, and then fetch it in the test method), so I can only assume that it is somewhere related with permissions.
Although the message states that "your development organization has been notified" , I didn't get any message (up to a week or two ago, I would get an e-mail in the event of such a message, but this stopped working, I no longer get these messages, I am also having difficulties displaying the system log, something that would work perfectly up to a few week ago)
Koen.
All Answers
I am not in development mode, I installed the package on a different account and have the same result. the code is quite simple, I create a new custom object (that is also part of the package) initialize its properties and then call the insert (call is within try catch with a DMLException catch) the code is on the controller of a component (also part of the package) I thought it might be something that I shouldn't call DML in get methods, so I moved it to an action method and associated it with a command butoon but I still have the same result.
The insert statement itself is ok, because it runs when called from the testmethod I placed on the class.
I suppose you asked if I were in development mode because I would get more information in development mode?
Well you are right there is a whole world of information displayed now, It added the magical words "system.exception" (wauw, now I reallyknow what is wrong) and I got a line number (but that I already knew as I had only one DML statement in the code)
System.Exception: bvdep : DML currently not allowed
Class.bvdep.ProductInstallerController.Install: line 78, column 17 External entry point