You need to sign in to do that
Don't have an account?
AntonyasLen
Deployement error
Hi,
i wanted to deploy a part of my work but i waste a few hour and it doesn't work.
I wrote some class who validate my apex code (class and triggers) and everythings is around 80 to 100%.
But when my IDE tried to deploy my work i kept got error.
The current one si that
System.DmlException: Insert failed First exception on rowx 0: UNABLE_TO_LOCK_ROW unable to obtain exclusive access to this record.
and this error is the same for my test class;
I really to deploy some critrical features but i'm kind a lock.
Anyone can help me?:(
Thanks for your post.
i found a few problem :
- First, i merged two triggers, i guess this is kind a helpful .
- Secondly, i was thinking that Salesforce deployment would merge/update every field but it has and exception : - AUTONUMBER -
my field called Opportunity Number was set as OP-{DD}{MM}{YY}-{0000} in my production environment and as B2B-{DD}{MM}{YY}-{0000} in my sandbox.....
You have to check every AUTONUMBER before any deployment .
Thanks to everybody for your help!!!
All Answers
Hi,
You can check any approval process are there on quote.
Hi ,
I'm sorry because i accepted as a solution but it didn't fix my problem.
Can you tell me more about the autonumber field issue???
I was so happy to get almost 100% to all my class and triggers with my tests but now i'm stuck. (my boss will kill me ahaha)
By the way i will check around the auto number one more time but it looks to be an other kind of problem.
If someone does have any others idea let us now.
Thanks a lot
Sincerely,
Antony
As we can see in my code with the error message the problem should be around the Name field but it's not an autonumber , the autonumber is QuoteNumber and between my production and sandbox environment the settings are the same.
I need your help. =(
i changed something about and object in my classes.
now the error go down a little bit :
I'm kind a mess i still got the error but if i'm testing my class i got the result below :
and i already changed every single call to my "autonumber" following this step:
http://techblog.appirio.com/2009/01/work-around-for-sfdc-auto-number.html
maybe it can help some guy but i still missing something. :(
Nobody can help?
Here's a few ideas -- I've only had this happen to me once and it was a spurious erorr that went away for good during my next Run All Tests execution
In PROD, are there multiple triggers on Opportunity that attempt to access some shared resource?
Does your Production system have resources locked used by your testmethods? In the case you cited, you are doing inserts so normally this wouldn't be true unless a trigger on Opportunity needs access to something outside of the objects created by testmethods
Thanks for your post.
i found a few problem :
- First, i merged two triggers, i guess this is kind a helpful .
- Secondly, i was thinking that Salesforce deployment would merge/update every field but it has and exception : - AUTONUMBER -
my field called Opportunity Number was set as OP-{DD}{MM}{YY}-{0000} in my production environment and as B2B-{DD}{MM}{YY}-{0000} in my sandbox.....
You have to check every AUTONUMBER before any deployment .
Thanks to everybody for your help!!!