Hot answers tagged

17

I've been working on a tool that allows you to export the apex logs and then gives you some basic highlighting, searching and filtering options. I often end up working with logs closer to 2 MB in size and needed a way to quickly filter out just the USER_DEBUG messages. FuseIT SFDC Explorer is .NET based and currently only runs on Windows. It is still in ...


13

You are most likely encountering ESLint errors in VS Code. As an example below is how my code looks like with those warnings. However I am still able to save the component and utilize alert or console.log statements specifically for debugging purposes. Your options are: Just ignore those warnings You can choose to suppress those warnings by right ...


7

This is an error or misconfiguration on Salesforce's side - at least it was in my case. You should open a support-case and refer to this link and maybe my case number (12670479). They have resolved the issue and replied this Hi, Hope you are doing well. This is to inform you that I was able to get in touch with Tier 3 to enable a permission so that ...


7

This feature is being delivered in Winter 18: Make Your Lightning Pages Dynamic Now you can control when a component appears on a record page by adding filter conditions and logic to its properties. No need to add anything to your custom components. It’s all handled by the Lightning App Builder. For example, construct a filter that causes a rich text ...


6

A better solution is to use the API function: sforce.console.isInConsole() as described here: www.salesforce.com/us/developer/docs/api_console/Content/sforce_api_console_isinconsole.htm if (sforce.console.isInConsole()) { // do console logic specific code } else { // do standard app logic specific code } srcUp is an internal function and ...


5

Agreed that the ExtJS console needs a lot of work. anything halfway complex will bring the interface to its knees. I have settled into a groove of running unit tests from the website and downloading the log, or copying and pasting the raw log into Notepad++, once there its a 2 click operation to find the lines with this regular expression "USER_DEBUG|FATAL|...


4

How about using local storage? E.g. localStorage.setItem("globalVarName", "value as string"); var globalVarVal = localStorage.getItem("globalVarName"); This value will persist even after the browser is closed, however I'm sure you could alter this behaviour if not desired. Check out http://diveintohtml5.info/storage.html for more info.


4

I'd recommend writing and testing your Query Activities outside of the platform using a local installation Microsoft SQL Server or SQLFiddle (using MS SQL Server 2008). It doesn't make sense for all queries, but with a query that has some complexity to it, I build and test it locally. As you may have noticed, if you query has any kind of runtime error, you'...


3

I often find myself using the "Open Raw Log" button, then scraping the log, saving it to a text file with a .log extension. Then I can open it in OSX's "Console" app, which provides better (and more performant) tools for analyzing logs. I also rolled a simple FileMaker database that can read in the log (each line is a record) and provide a quick way to ...


3

sforce.console is in the Console Integration Toolkit's script along with that method you're trying to call: getEnclosingPrimaryTabId. It looks like you're only loading the Ajax Toolkit. (connection.js & apex.js) If you add the console integration toolkit to your button, you should be good to go. {!REQUIRESCRIPT("/support/console/34.0/integration.js")}...


3

You need the getFocusedPrimaryTabId, or possibly getPrimaryTabIds: (function (c) { "use strict"; var focusedPrimaryTabId, allPrimaryTabIds; c.getFocusedPriaryTabId(function (result) { focusedPrimaryTabId = result.id; }); c.getPrimaryTabIds(function (result) { allPrimaryTabIds = result.ids; }); })(sforce.console); ...


3

You have to use find method of the Matcher class. In my observation, if you use m.find() function it search for the string based on your pattern then returns true and you will get the value in debug string str='this is a test [12312] email subject [dfasdfa]'; Pattern patt = Pattern.compile('\\[([0-9]*?)\\]'); Matcher match = patt.matcher(str); if (match....


3

Here is a small experiment as a proof of concept to emit events from lightning component and handle in VF <aura:component> <div> Hello World !!!! </div> <aura:registerEvent name="myevent" type="c:myEvent" /> <ui:button label="fireEvent" press="{!c.fireevent}" /> </aura:component> The JS controller file ({ ...


3

My understanding is that a Salesforce Platform license does not allow access to tabsets aka standard apps. The service cloud console an example of an app, so by having that new profile enabled in a console app it is trying to give it access a standard tabset. This causes a validation error when you try to save the profile. It's not strictly related to custom ...


3

If you have 'Enable clickjack protection for customer Visualforce pages with headers disabled' it will block VF pages in the console. This is because each tab in the console is an iFrame, and VF pages are served from a separate domain than the main console. So this security setting will block VF pages from being served in the console. The workaround is to ...


3

Answering your two questions: Is it possible to have the record type in the same page layout of the task? If so, how can i accomplish it? No, by standard way, it first asks for RecordType then proceed to layout. Also, is there a way to get the visualforce source for the custom tasks what I have created with declarative configuration, so that I ...


3

It seems you're passing the record ID of some other object to the page, not a task. The prefix for a task ID is 00T, you have a02 which leads me to believe you're passing the ID of a custom object since that prefix isn't in Daniel's comprehensive list. Check the code for where you're including this component and double check what record ID you're passing to ...


3

Resolution: This is now a Salesforce bug. See details Here and click on the button that says 'This Issue Affects Me' to be notified of a resolution. Looks like planned fix is Summer at the latest, the response on my case said it may be sooner. We are experiencing the same issue when users log in using IE10 or IE11 (necessary for legacy systems) and ...


3

In this case, you need to specify undefined rather than defined as null in the first argument of sforce.console.openPrimaryTab(***id:String***, url:URL, active:Boolean, (optional)tabLabel:String, (optional)callback:Function, (optional)name) So, it will be as follows: sforce.console.openPrimaryTab(undefined,"/"+id, true, '{!title}'); In the below picture ...


3

For dynamic manipulation of fields you could define a field set and add fields into the field set. Setup--> Account --> Field Sets In this example, field set name is judelaw. In the page layout, add your desired fields. Visualforce <apex:page standardcontroller="Account"> <apex:form > <apex:repeat value="{!$ObjectType....


3

sforce.console only works in the classic console. The Lightning Console API is not GA yet. You can see information about the pilot here: https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_js_getting_started.htm. Look at this question, it talks about how to use force:refreshView Reload whole page in '...


3

If it isn't anything that is explicitly documented by Salesforce then unfortunately it would be an unsupported hack or workaround for the time being. If it works, you can continue to use it; but the risk you run is that Salesforce can at anytime update or change this behavior which would cause your page to break.


3

Indeed, this is not supported in Lightning. In my organization, I mainly overcame this by including the desired logic in a unified Custom HTML email template, and set it as a default for the Email action. Also, I added the recipient list, email subject, FROM, to, cc and bcc fields as formulas in predefined fields on that same Email action. If you'll share ...


3

The sforce.console.getEnclosingTabId method is asynchronous and the method you pass in as a parameter is termed a callback function. This behavior is clearly indicated in the documentation: This method is asynchronous, so it returns its response in an object in a callback method. Due to the above, your subtabId is still empty (''), so your call to ...


3

With Summer 18 Release, you can open custom lightning components in a new tab. If You are trying to open MyComponent.cmp in a new tab/subtab, implement this interface lightning:isUrlAddressable in that component. <aura:component description="MyComponent" implements="lightning:isUrlAddressable"> In the other Component, in which you are trying to ...


3

You can't directly call JavaScript from Apex. JavaScript executes on the client side, in the browser; Apex is executed on the Salesforce server as part of the page render process or in response to a request initiated by the client. What you can do is initiate an operation, on the client side, in JavaScript, that calls out to the server-based Apex controller ...


3

I think you have some large data sets in prod which are exposing some issues. In your case, I think you're querying for all accounts, and on 3 occasions querying for all your contacts and opps as well. Also, you have 3 nested for loops. Cubes like that take time. Having said that, it seems like the goal of your code is to check which accounts are ...


2

Unfortunately, it's pretty rough to compare logs. AFAIK, there's no way to compare within the Developer Console; I think they mean "Look at each of them and remember similarities and differences." There used to be a "Download" button, but it was removed in the Summer '12 release for some reason. The best solution I can recommend is to set up Debug Log ...


2

check below link for enable keyboard shortcuts in your organization https://help.salesforce.com/apex/HTViewHelpDoc?id=console2_setup_keyboard_shortcuts.htm&language=en


2

When you look at a case, you should be able to see a Solutions section (subject to page layout for the case - if you don't see it, you will need to add it to the page layout for the case). The solutions section has a "View Suggested Solutions" button which tries to match the case contents up with an existing solution. It also has a search box to allow you ...


Only top voted, non community-wiki answers of a minimum length are eligible