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
ALLUMULA VENKATA MANIKANTALLUMULA VENKATA MANIKANT 

write a trigger When standard object creates custom should automatically should create And when ever custom object created standard should create automatically but number should be same But number should not be mismatched mismatching

Best Answer chosen by ALLUMULA VENKATA MANIKANT
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Allumula,

Can you please confirm what should it create. Is it when a standard object record gets created the custom record should get created. What is the standard object you are referring to. Please help the community to understand the question .

Thanks,
K. Sai Praveen Kumar.

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Allumula,

Can you please confirm what should it create. Is it when a standard object record gets created the custom record should get created. What is the standard object you are referring to. Please help the community to understand the question .

Thanks,
K. Sai Praveen Kumar.
This was selected as the best answer
ALLUMULA VENKATA MANIKANTALLUMULA VENKATA MANIKANT
Service request  $ Service requests

Service request is a standard object
Service requests is a custom object


As we know standard object (service request) can be used by minimum no of person as per license for limited users

So for that reason we created a custom object (service requests)so that other users can use 

So we are generating case in service request (standard)when any request comes
So we are creating new service request 

Case can be generated via phone ,email,web

In email when ever customer drops any email it will be automatically case number will be generated in service request (standard)

In phone also similarly whenever customer enters in the application it will  autogenerate case 

Web means Html page will there in which we enters all details it will be generated as case

The service request no and standard case number are the fields in custom object (service requests)fields  and 
Service request number and custom case  are the fields in standard object (service request)


Service request no is a autonumber
In both standard(Service request) and custom object (Service requests)

Scenario in standard object:-

Standard Object 2nd field( Custom case(visit to the branch)) is look up to custom object (service requests)

Scenario in custom object :

Custom object 2nd field (Standard case number(CCC)) Is done with a formula field and the value in this comes from Stabdard object (Service request)

Then we have process builder

1.) Standard to custom
2.) Custom to standard


In standard when case is created condition should be true 

In immediate action

Record type - service requests(working on custom)



When standard object  creates custom should automatically should create

And when ever custom object  created  standard should create automatically  but number should be same 

But number is mismatching...what should we do?