In select list type --None--,Account,Contact,cas.
If iam select Account , Account pageblock should be come .if i am select Contact Contact page block shoud be come.this is my requirement
In this example, if you select Account, it will display the account id, and account name. If you select Contact, it will display the contact id and contact name. Same for the lead object. You can querry as many feilds as per your requirement.
Hi Krishna,
This is really hard to follow. Can you please elaborate your requirement.
Regards,
Priya Ranjan
Please Share your error here.
please discuss in detail
Thank you!
Regards,
Suraj Tripathi
I was able to find one approach that you can modify to fit accordingly, below is the link for the same can you try checking it once?
>> https://pritamshekhawat.wordpress.com/category/lightning-component/lightning-web-component/
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
Hi Krishna,
You can try with below sample code.
In this example, if you select Account, it will display the account id, and account name. If you select Contact, it will display the contact id and contact name. Same for the lead object. You can querry as many feilds as per your requirement.
Component :-
Js Controller :-
Apex Class :-
If the above information helps you, please mark it as best answer so that it can helps others in future.
Regards,
Priya Ranjan