function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Santosh RothuSantosh Rothu 

Procedure class

global class Positions__c
{
   global void Positionpro()
    {
        Position__c pos=new Position__c();
        
        pos.Contact_Number__C ='1569896';
        pos.Location_del__C ='tex';
        pos.Place_applied_for__C ='USA';
        pos.Position_Name__C = 'Salesforce admin';
        Pos.Qualification__c ='B.tech';
        pos.name = 'Prjwal';
        Pos.Skills_Required__c ='Communication & Salesforce admin';
        pos.Visit_for_Details__c ='https://lntcom3-dev-ed.my.salesforce.com/_ui/common/apex/debug/ApexCSIPage';
        
        
        Insert pos;
        
        if(pos.id!=null)
        {
            System.debug('Your position details Recorded sucussfully'+Pos.id);
            
            Hiring_Managers__c Hr= new Hiring_Managers__c();
            
            hr.Name ='Jakson';
            hr.HR_Contact__c ='+911230';
            hr.HR_Email__c ='xyz@gmail.com';
            hr.Mile_stone_date__c = date.newInstance(2021,12,31);
            hr.Position_Open_Date__c = date.today();
            
            hr.Position__c=pos.id;
            insert hr;
            
            if (hr.id!=null)
            {
                system.debug('Your Hr Record entered sucuufully'+hr.id);
            }
            
 
        }
              
    }
}

when excute Error like this,this is for another program..For all Procedure classes get error in this way.Please do help for me.
Santosh RothuSantosh Rothu
any one help me in ths????
Prasanthi_s1505Prasanthi_s1505
Hi Santosh,

Can you send the Anonymous window code also. Because I didn't found any mistake in the code. It may be the mistake from Anonymous window code. 

Thanks,
Prasanthi
AbhinavAbhinav (Salesforce Developers) 
The method name in error is it in this block of code or dependent code?
 
Santosh RothuSantosh Rothu
Hi Prasanthi & Abhinav,

Dependent code given as follow  in Anonymous window

Positions__c Postn= Positions__c();
postn.Positionpro();

 
Prasanthi_s1505Prasanthi_s1505
Hi Santosh,

Positions__c Postn= Positions__c();
postn.Positionpro();

it should be..

Positions__c Postn= new Positions__c();
postn.Positionpro();

If it was helpful please mark it as Best Answer.

Thanks
Prasanthi

 
Prasanthi_s1505Prasanthi_s1505
Hi Santosh,

If it is not cleared. Please share the error window full snip.
Here u the Class Name and the Object Name are the same.


Thanks
Prasanthi