Monthly Archives: February 2017

Block Ads in browser and skype

Modify your host file like suggested in this article: http://someonewhocares.org/hosts/   # This hosts file is brought to you by Dan Pollock and can be found at # http://someonewhocares.org/hosts/ # You are free to copy and distribute this file for … Continue reading

Posted in Uncategorized, Windows | Tagged , , | Leave a comment

Salesforce: get applications and tabs profile assignments

Salesforce: get application names, application profile assignment, custom tab profile access availability, app to tab correspondence. To Get Custom and Standard Application Names run usual Apex SOQL query: select Id, ApplicationId, Name, Type from AppMenuItem where Type = ‘TabSet’ To … Continue reading

Posted in apex, salesforce, Uncategorized | Tagged , , , , , , , | Leave a comment

Salesforce: use Apex Code to grant permissions to custom object and fields

List<Id> profilePermissionsSetIds = [ select id, Profile.UserLicense.Name from PermissionSet where IsOwnedByProfile = true and Profile.UserLicense.Name = ‘Salesforce’]; List<ObjectPermissions> objPermissions = new List<ObjectPermissions>(); for ( String pId: profilePermissionsSetIds ) { objPermissions.add( new ObjectPermissions ( SObjectType = ‘Custom_Object__c’, ParentId = pId, PermissionsRead … Continue reading

Posted in Administration, apex, Profile, salesforce, Uncategorized | Tagged , , , , , , , , , | Leave a comment

Get SObjectName by Key Prefix

This documentation link code returns empty for hidden SObject Types, while this version of code presented below works just fine

Posted in apex, salesforce, Uncategorized | Tagged , , | Leave a comment

Commands to prevent Windows 10 spying on you

sc delete DiagTrack sc delete dmwappushservice echo “” > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl reg add “HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection” /v AllowTelemetry /t REG_DWORD /d 0 /f

Posted in Administration, Uncategorized, Windows | Tagged , , | Leave a comment

Salesforce: Querying Tooling API

Recently I have found interesting question about FieldDefinition Metadata field on SSE. Some person was trying to query for it in usual apex. Salesforce documentation and behavior might be misleading, since they have removed some old good documentation and there … Continue reading

Posted in apex, field, salesforce, Uncategorized | Tagged , , , , , , | Leave a comment

Salesforce Apex Code to identify formula fields containing hyperlinks

This is Salesforce Apex Code to identify formula fields containing hyperlinks String s = ”; String x = ”; Map<String, Schema.SObjectType> globalMap = Schema.getGlobalDescribe(); for ( String key: globalMap.keySet() ) { Map<String, Schema.SObjectField> fieldsMap = globalMap.get( key ).getDescribe().fields.getMap(); for ( … Continue reading

Posted in apex, field, Uncategorized | Tagged , , , , , , , , , , , , , | Leave a comment