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
Anil JagtapAnil Jagtap 

How to create view programmatically?

I retrive all contact fields using describe() in my application. Now,I want to create view or update view based on filed selection.

For example:

1) If I select 4 fields first time from my application then custom view should be create in salesforce.

2) If I select one more field next time from app then one column should be add in existing custom view in sales force

I didn't find any code or API to create view dynamically in sales force.

Please tell me how can I do this?

Raj VakatiRaj Vakati
You can use salesforce UI api .. 

https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_get_started.htm
https://trailhead.salesforce.com/en/modules/user-interface-api