When I create Custom object from C# Application using metadat api ,so it will be created in my developer org. but I have to manually check field level scurity for fields of object for my profile. I have System Administrator Profile.
So pls Give me Example. I have already tried your solution but it doesn't work.
Was anyone able to resolve this challenge? I am working on a C# tool that creates custom fields in SFDC and as of now, as there is no FLS assigned, the field is not available for the user to add in the layouts. Because, the field should have FLS defined for that user's role/profile.
Please follow below url:-
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_quickstart_java_sample.htm
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
I believe you will need to use the Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) metadata to set field level security. Profile has a fieldLevelSecurities field, which is a collection of ProfileFieldLevelSecurity (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm#profilefieldlevelsecurity_title).
There is an example of setting these values using the Metadata API in C# in Set Field Level security for profile using meta-data api (http://salesforce.stackexchange.com/a/58243/102)
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya
When I create Custom object from C# Application using metadat api ,so it will be created in my developer org.
but I have to manually check field level scurity for fields of object for my profile.
I have System Administrator Profile.
So pls Give me Example.
I have already tried your solution but it doesn't work.
Was anyone able to resolve this challenge?
I am working on a C# tool that creates custom fields in SFDC and as of now, as there is no FLS assigned, the field is not available for the user to add in the layouts. Because, the field should have FLS defined for that user's role/profile.