Skip to main content


Showing posts from October, 2017

Setting delimiter for CSV file when using Data Loader command-line (CLI)

 When using data loader, We can set the delimiters using data loader settings as below     But if you are running CLI, Make this change in process-conf.xml file. Add this option if your CSV file uses commas to delimit records.  <entry key="loader.csvComma" value="true"/>  Add this option if your CSV file uses tab to delimit records.   <entry key="loader.csvTab" value="true"/>  Add this option if your CSV file uses any other symbols to delimit records. <entry key="loader.csvOther" value="true"/>  <entry key="loader.csvOtherValue" value="+"/>

How to make internal user access files uploaded by community user?

 When the file is uploaded by community user, By default the file will be shared to the file owner and with the record that is being attached. So the file can't be accessed by internal users. File Owner will have Owner Permission and the record will have Viewer permission   You can query the file using contentDocument object. To make the file available for every one, We need to change the "Sharing Settings" of the file. To change sharing settings, Open the file which will navigate you to content page. Click Show all for sharing We can also share the file using apex. To publish a record in shared work space         ContentVersion doc = new ContentVersion();         string input = 'Testing ';          Blob blobInput = Blob.valueOf(before);         doc.Title = title;         doc.PathOnClient = 'xyz';         doc.VersionData = blobInput;         insert doc;         doc = [select ContentDocumentId from ContentVersion where id =];         ContentWor