You need to sign in to do that
Don't have an account?
kkaal
Update works, but not insert
I have a custom object which is edited in a edit form.
if((editTrait.Id == null) || (editTrait.Id == '')){ insert editTrait; } else { update editTrait; } editTrait = new Trait__c();
My question:
The update works, but not the insert. I made sure that the must fields are filled. Is my if statement wrong?
I would try a couple of things:
First, add some debug after the insert to ensure it has completed successfully - dump out the editTrait object
Second, if the above doesn't shed any light, change the insert to a Database.insert and inspect the result to see if there were any errors.
Sorry for my stupid question:
Over the WE I treied to make the debugging work. I get the logs, mut my statements System.debug(LoggingLevel.Info,...
does not show any entry in the logs.
What would be the right debug statement. Maybe there is a good docu on that?? The standard docu, just tells me how I can switch on the logging, but not enough to about how to write the right statements in the code.
Thanks
It depends on the filter settings as to what will appear in the logs.
If you are struggling with that, another way is to add a pagemessages tag to the page and add some messages at the INFO level.