Hi team,
I am trying to create dynamic folder programmatically (from client side code),
Below is the code I tried where I am able to create record in ObjectFolder table but the folder is not visible on the frontend (UI), the reason what I think could be that I am using direct Insert.
![](https://d3a7ykdi65m4cy.cloudfront.net/com-en/s3fs-public/inline-images/InsertMethod.PNG)
When the above solution doesn't worked for me I tried calling "saveLookupFolder" method inside FolderManagerViewModel. Below is the code for it.
![](https://d3a7ykdi65m4cy.cloudfront.net/com-en/s3fs-public/inline-images/SaveLookupFolder.PNG)
Following is the "saveLookupFolder" method inside FolderManagerViewModel.
![](https://d3a7ykdi65m4cy.cloudfront.net/com-en/s3fs-public/inline-images/FolderMangerViewModel.PNG)
It's giving me this error :
![](https://d3a7ykdi65m4cy.cloudfront.net/com-en/s3fs-public/inline-images/Error_4.PNG)
In my usecase I have to create a record inside ObjectFolder table with two parameters which are "SearchData" (folder filter Value) and "Name" (folderName). But I don't know If I am using the right base function (saveLookupFolder) for this purpose, but I also think that direct insert will provide no help to me.
Someone please help in this case. What base function to call and how to call?