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
Anitha Reddy 14Anitha Reddy 14 

create apex classA to insert 2 account records and pass that account object to classB..Please help me

Harish RamachandruniHarish Ramachandruni

You can pass id values through url . 

Here we go.
public class A {
public void insertAccount() {
insert account;
//Option 1
B init = new B();
init.acc= acount;

public class B {
public Account acc;
public void passAccount() {
//business logic