Salesforce bug with leading or trailing spaces in Job Name inside System.schedule method

I found interesting error\bug which exists in SFDC for five years at least and solution here:

https://developer.salesforce.com/forums/?id=906F00000008xchIAA

When one tries to schedule a job with job name having leading or trailing spaces, following error occurs:

triggerMustBeAssociatedWithAJobDetail

System.AsyncException: trigger must be associated with a job detail

Moreover, if there is scheduled job with name ” and someone tries to schedule a job with job name having the same string with leading or trailing spaces, following error occurs:

unexpectedException

System.UnexpectedException: common.exception.SqlDupValOnIndexException: ORA-00001: unique constraint (CORE.AKCRON_JOB_DETAIL) violated ORA-06512: at “DOC.UDDDMLCRONJOBDETAIL”, line 32 ORA-06512: at “DOC.CCRONJOBDETAIL”, line 95 ORA-06512: at line 1 {call cCronJobDetail.insert_detail(?,?,?,?,?,?,?,?,?,?,?)} {call cCronJobDetail.insert_detail(?,?,?,?,?,?,?,?,?,?,?)}

I have created an idea on Idea Exchange on fixing this. Please vote if you agree this should be fixed: https://success.salesforce.com/ideaView?id=08730000000DpYoAAK
Have a nice day.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Salesforce bug with leading or trailing spaces in Job Name inside System.schedule method

  1. Pingback: patlatus

  2. Winder Ojeda says:

    Hi patlatus,

    What is the solution for de second problem?

    System.UnexpectedException: common.exception.SqlDupValOnIndexException: ORA-00001: unique constraint (CORE.AKCRON_JOB_DETAIL) violated

    Grettings

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s