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
Anand TripathiSBIAnand TripathiSBI 

I am inserting new record using apex code. My code is correct. But whenever I check this new record in my org by clicking on Account tab the record is not displaying. Can you help me

I am inserting new record using apex code. My code is correct. But whenever I check this new record in my org by clicking on Account tab the record is not displaying. Can you help me. I inserted the record using VF and clicked on Account tab . There is no new record only old accounts are there. why this happening.
PradeepgorePradeepgore
Hi Anand,

Can you please paste the code here ?
Additionally, you may put a debug for Id in code after inserting the record and paste the Id in URL.
Also, check ownership of the record and the default list view filters.

- Pradeep


 
Suraj Tripathi 47Suraj Tripathi 47
Hi Anand,

If your record is create then it should definitely available in org. please select all account in filter box 
then check your record exist or not.

If you find your Solution then mark this as the best answer.

Thank you!
Regards,
Suraj Tripathi  

 
Naveen KNNaveen KN
1. If you have an option to get the Id of that records from debug logs, get it and try to open the record from the URL
2. check if there is any sharing rules created for that particular record type and your user has sufficient permissions. As you are the owner of the record you must be able to view it, just in case if any automation is changing the owner of that record. 
3. Check which List view you are viewing in the account tab, sometime you may have your fav list view with filters that doesnt bring this newly created record. 

Let us know if anything helps and also share us why exactly you didnt find the record once you get it. Thanks. 
Anand TripathiSBIAnand TripathiSBI
What ever point you have mentiond above I have alredy checked. Now I am trying to insert a new record in account via add new account (Account button) and the error shown is The requested reserouce doesn,t exist. So I Think there is some other issue thats why whenever I am trying to insert a new record via apex code the new record is not get inserted.
SS