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
rishi jaykar 1rishi jaykar 1 

how to set Field-Level Security for Profile through metadata api via php

$customField = new SforceCustomField();
$customField->fullName='Account.Test2__c';
  $customField->description='Description of New Field';
  $customField->label='My Custom Field Label';
  $customField->type='Text';
  $customField->length=255;
  $customField->unique=true;
  $customField->isVisible=true;
  $customField->externalId=true;
//$customField->fieldLevelSecurities=true;
 // $customField->visibility=true;
 //$customField->readable = true;
  //$customField->readableSpecified = true;
  //$customField->permissionsRead =true;
  //$customField->accessible=true;
//$customField->sharingModel=true;
  //$appVisibility->appVisibility(true);
SandhyaSandhya (Salesforce Developers) 
Hi ,

Please refer below link which has a similar discussion and has the sample code in c#.See if you can do something similar with PHP.


http://salesforce.stackexchange.com/questions/34521/set-field-level-security-for-profile-using-meta-data-api
 
Hope this helps you!

If this helps mark it as solved.

Thanks and Regards
Sandhya
rishi jaykar 1rishi jaykar 1
hii sandhya
i also do  througt this but i'm not find exact solution.