You need to sign in to do that
Don't have an account?
Mayank Deshpande 2
Facing issue on system.debug ()
Hi All,
I am new in salesforce . i write a code to insert a record in custome object and used system.debug to check the code .
Public Class inserrecordincampsite
{
Public Static Void InsertRecord()
{
Campsite__c Camp = new Campsite__c (Name='Mayank',Description__c='xyz');
insert Camp;
system.debug('Record Inserted' +Camp)
}}
after exeuction of code through anonymous window , debug message generated is blank and showing 0 DML operation performed.
can anyone suggest wht's wrong in code .
I am new in salesforce . i write a code to insert a record in custome object and used system.debug to check the code .
Public Class inserrecordincampsite
{
Public Static Void InsertRecord()
{
Campsite__c Camp = new Campsite__c (Name='Mayank',Description__c='xyz');
insert Camp;
system.debug('Record Inserted' +Camp)
}}
after exeuction of code through anonymous window , debug message generated is blank and showing 0 DML operation performed.
can anyone suggest wht's wrong in code .
Can you please try below code
Let us know if this will help you
Could you share how you executed the code?
inserrecordincampsite.InsertRecord() should work in anonymous window!
Also try to see if it throwed any error or not like that.See if all the mandatory fields of Campsite__c object is set or not . that can throw an error during insert operation.
Thanks and Regards,
Shiva RV