Skip to main content
added 15 characters in body
Source Link
Vamsi Krishna Gosu
  • 10.5k
  • 5
  • 33
  • 50

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error: System.FinalException: SObject row does not allow errors

System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value""You Must Enter a Value", but instead of throwing the error back to the user, the next line is: EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?

Update - apparently, it is this line causing my issue:

newCampaign = (Campaign)Campaign.sObjectType.newSObject(null, true);

if I use the standard way:

newCampaign = new Campaign();

the page works just fine.

Is that expected behavior?

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error: System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value", but instead of throwing the error back to the user, the next line is: EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?

Update - apparently, it is this line causing my issue:

newCampaign = (Campaign)Campaign.sObjectType.newSObject(null, true);

if I use the standard way:

newCampaign = new Campaign();

the page works just fine.

Is that expected behavior?

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error:

System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value", but instead of throwing the error back to the user, the next line is:

EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?

Update - apparently, it is this line causing my issue:

newCampaign = (Campaign)Campaign.sObjectType.newSObject(null, true);

if I use the standard way:

newCampaign = new Campaign();

the page works just fine.

Is that expected behavior?

Tweeted twitter.com/#!/StackSalesforce/status/281983724072087552
added 261 characters in body
Source Link
BritishBoyinDC
  • 14.3k
  • 3
  • 44
  • 85

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error: System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value", but instead of throwing the error back to the user, the next line is: EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?

Update - apparently, it is this line causing my issue:

newCampaign = (Campaign)Campaign.sObjectType.newSObject(null, true);

if I use the standard way:

newCampaign = new Campaign();

the page works just fine.

Is that expected behavior?

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error: System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value", but instead of throwing the error back to the user, the next line is: EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error: System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value", but instead of throwing the error back to the user, the next line is: EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?

Update - apparently, it is this line causing my issue:

newCampaign = (Campaign)Campaign.sObjectType.newSObject(null, true);

if I use the standard way:

newCampaign = new Campaign();

the page works just fine.

Is that expected behavior?

Source Link
BritishBoyinDC
  • 14.3k
  • 3
  • 44
  • 85

Required Field on VisualForce Triggers "SObject row does not allow errors" message?

I must be missing something here..I have a visualforce page, that enables a user to create a Campaign - I have a pageblock/section with the Campaign Fields, including name, and Name is marked required. I click a button, and if the name field for Campaign is blank, I get this error: System.FinalException: SObject row does not allow errors

In the logs, the line before my error is a VF Page Message "You Must Enter a Value", but instead of throwing the error back to the user, the next line is: EXCEPTION_THROWN [EXTERNAL]|System.FinalException: SObject row does not allow errors

And the thing is, if I remove all code in the pagereference call in the controller, and just return null, it still gives the error, but as far as I can tell, I am not writing anything to the database?