You need to sign in to do that
Don't have an account?
Santosh 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);
}
}
}
}
{
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);
}
}
}
}
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
Dependent code given as follow in Anonymous window
Positions__c Postn= Positions__c();
postn.Positionpro();
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
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