-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
23Questions
-
6Replies
Visualforce page jumps to a text box on load (lightning)
Hello,
We have a button on cases that load up a visualforce page and prompts the user to enter information. There are text boxes, radio buttons, check boxes, etc. When the page loads, the page jumps down to the first text box, causing the user to have to scroll back up to enter the checkbox/radio button information. This only seems to happen in lightning. How can we stop this from happening?
We have a button on cases that load up a visualforce page and prompts the user to enter information. There are text boxes, radio buttons, check boxes, etc. When the page loads, the page jumps down to the first text box, causing the user to have to scroll back up to enter the checkbox/radio button information. This only seems to happen in lightning. How can we stop this from happening?
-
- Stephen E 4
- January 16, 2019
- Like
- 0
- Continue reading or reply
how to stop actions from showing up on the feed tab
We have a action that creates an opportunity from a case. When we put the action (which calls a flow) on the page layout, it does not show up with all the other actions or buttons, but rather it shows up on the feed tab on the page. How can we change this? Users do not want this on the feed tab, they want it at the top of the page with the rest of the buttons.
-
- Stephen E 4
- November 13, 2018
- Like
- 0
- Continue reading or reply
How to avoid hard coded URLs, especially in email templates?
Hello,
We currently have many email templates with hard coded URLs (na24 for example.) The instance change will cause us to have to change all of these URLs (think its changing to NA28 or something) whats the best way to avoid hard coded URLs in the future? can we just use login.salesforce.con/therecordid ?
We currently have many email templates with hard coded URLs (na24 for example.) The instance change will cause us to have to change all of these URLs (think its changing to NA28 or something) whats the best way to avoid hard coded URLs in the future? can we just use login.salesforce.con/therecordid ?
-
- Stephen E 4
- October 23, 2018
- Like
- 0
- Continue reading or reply
How to fast lookup salesforce files within a flow?
Hello,
Currently, we have a flow on an opportuntiy that checks to see how many attachments there are. We are going to move to salesforce files and one of the settings we have enabled is the "Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments"
Since these files are now being uploaded as files and not attachments anymore, I need to change the flow to look up and count the number of files instead of attachments. However, inside of flow, I do not see a "Files" option. Is it possible to fast look up files inside of flow?
Currently, we have a flow on an opportuntiy that checks to see how many attachments there are. We are going to move to salesforce files and one of the settings we have enabled is the "Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments"
Since these files are now being uploaded as files and not attachments anymore, I need to change the flow to look up and count the number of files instead of attachments. However, inside of flow, I do not see a "Files" option. Is it possible to fast look up files inside of flow?
-
- Stephen E 4
- October 18, 2018
- Like
- 0
- Continue reading or reply
Is there a guide on how to install the migration tool on a ubuntu server?
Currently, we want to be able to push our metadata from salesforce to github using the migraiton tool. However, we want to do it on an ubuntu server. All the tutorials I have seen have been for mac/windows machines. Is there any tutorials on how to do it on a ubuntu server?
-
- Stephen E 4
- July 27, 2018
- Like
- 0
- Continue reading or reply
How to select "Run specified tests" when deploying to production from the Force IDE? (Eclipse)
When we select the "Default" option for example inside of change sets, we have many tests fail (some seem to be from unmanaged/managed packages) so we dont worry about them. Instead, we just select "Run specified tests" to get around this. How can we select this option when deploying from the Force IDE? Otherwise tests we cant control fail and we cant deploy.
-
- Stephen E 4
- June 01, 2018
- Like
- 0
- Continue reading or reply
How to turn off implicit sharing rules?
For example, we use territories in our org to organize our sales reps. When we remove them from the territory/shift them around, they should no longer have access to the account. But we notice that people who have had opportunities related to an account that they are no longer on the territory for still have access to the account since they are an owner of a child reocrd. How can we turn this off? They should have NO access to the account if they are not in the territory.
-
- Stephen E 4
- May 11, 2018
- Like
- 0
- Continue reading or reply
Value 'Wed Apr 25 00:00:00 GMT 2018' cannot be converted from Text to com.force.swag.soap.DateOnlyWrapper
Hello All.
I know there is a current limiation to dates fields and the inputhidden fuction in salesforce (https://success.salesforce.com/issues_view?id=a1p300000008dpwAAA)
However, I am getting this same error when the page is displaying a date field on a radio button option
Example:
assetToGet and assetGot are both instances of a custom object. 'mf' is the the repeat loop variable that contains the field names. So its dynaymically creating radio buttons. However, when selecting an option that is a date field and writing back to salesforce, I get an error (Value 'Wed Apr 25 00:00:00 GMT 2018' cannot be converted from Text to com.force.swag.soap.DateOnlyWrapper)
Is this also another limitation?
I know there is a current limiation to dates fields and the inputhidden fuction in salesforce (https://success.salesforce.com/issues_view?id=a1p300000008dpwAAA)
However, I am getting this same error when the page is displaying a date field on a radio button option
Example:
assetToGet and assetGot are both instances of a custom object. 'mf' is the the repeat loop variable that contains the field names. So its dynaymically creating radio buttons. However, when selecting an option that is a date field and writing back to salesforce, I get an error (Value 'Wed Apr 25 00:00:00 GMT 2018' cannot be converted from Text to com.force.swag.soap.DateOnlyWrapper)
<apex:selectOption itemLabel="{!assetToGet[mf]}" itemValue="{!assetToGet[mf]}" ></apex:selectOption> <apex:selectOption itemLabel="{!assetGot[mf]}" itemValue="{!assetGot[mf]}" ></apex:selectOption>
Is this also another limitation?
-
- Stephen E 4
- April 30, 2018
- Like
- 0
- Continue reading or reply
Display Names of relationships while dynamically creating visualforce page bindings?
Hey all,
I have some custom visualforce/apex that I wrote to merge custom object records. It works well, though the one issue we have is displaying "friendly names" rather than the ids when it comes to lookup/master detail fields.
Below is part of the visualforce page code.
'fields' is a list of the objects fields.
'mergedAsset' is a new sObject (i.e. custom_object__c CO = new custom_object__c())
assetToGet is record 1 (custom_object__c)
assetGot is record 2 (custom_object__c)
You loop through the fields dynamically creating radio buttons for user selection. though, on relationship fields it displays the lookups id. Is there a way you can see to display the actualy name of the record rather than the id?
I have some custom visualforce/apex that I wrote to merge custom object records. It works well, though the one issue we have is displaying "friendly names" rather than the ids when it comes to lookup/master detail fields.
Below is part of the visualforce page code.
'fields' is a list of the objects fields.
'mergedAsset' is a new sObject (i.e. custom_object__c CO = new custom_object__c())
assetToGet is record 1 (custom_object__c)
assetGot is record 2 (custom_object__c)
You loop through the fields dynamically creating radio buttons for user selection. though, on relationship fields it displays the lookups id. Is there a way you can see to display the actualy name of the record rather than the id?
<apex:repeat value="{!fields}" var="mf"> <apex:selectRadio value="{!mergedAsset[mf]}" layout="pageDirection" disabled="{!IF(assetToGet[mf] = assetGot[mf],true,false)}"> <apex:selectOption itemLabel="{!assetToGet[mf]}" itemValue="{!assetToGet[mf]}" ></apex:selectOption> <apex:selectOption itemLabel="{!assetGot[mf]}" itemValue="{!assetGot[mf]}" ></apex:selectOption> </apex:selectRadio> <br/> </apex:repeat>
-
- Stephen E 4
- April 29, 2018
- Like
- 0
- Continue reading or reply
Upload a CSV using apex/visualforce and represent as a pageblocktable BUT for an unknown object/unknown amount of fields
Hello!
We have made programs in the past that allow users to upload CSVs and import data. (But for a specific object, and a specific set of fields). If you know the object, and the format of the CSV, its very simple to represent your data as a pageblocktable. (Set values in column 1 to Account.Name for example)
However, in this case, is it possible to upload a CSV and represet the data as a pageblock table but for an unknown object/unknown set of fields?
We have made programs in the past that allow users to upload CSVs and import data. (But for a specific object, and a specific set of fields). If you know the object, and the format of the CSV, its very simple to represent your data as a pageblocktable. (Set values in column 1 to Account.Name for example)
However, in this case, is it possible to upload a CSV and represet the data as a pageblock table but for an unknown object/unknown set of fields?
-
- Stephen E 4
- April 29, 2018
- Like
- 0
- Continue reading or reply
[2018] How to schedule an Apex job to run every 10 minutes?
We replicate tickets/data from external APIs and would like if we could create tickets every 10 minutes. Is that possible with scheduled apex? I have been getting a lot of conflicting answers when googling (and a lot of answers are very old, dating back to 2011.)
Thank you!
Thank you!
-
- Stephen E 4
- April 13, 2018
- Like
- 0
- Continue reading or reply
How to remove/make use of the default save button that shows up on the lightning visualforce page action?
Currently, I have a visualforce page being called from an Account action button inside of lightning. (standard controller + an extension).
How can I either get rid of the 'Save' button or make use of it? I am not 'Saving' anything however, this program will actually make calls to an external API.
How can I either get rid of the 'Save' button or make use of it? I am not 'Saving' anything however, this program will actually make calls to an external API.
-
- Stephen E 4
- March 20, 2018
- Like
- 0
- Continue reading or reply
Is it possible to grab child accounts in a single SOQL query?
For example, if I wanted to grab accounts and their contacts in a single SOQL query I could do this:
[SELECT Id,(SELECT Id FROM Contacts) FROM Account]
Is this possible to do with child accounts? (Using the Standard "Parent" field)
When I attempt this:
[SELECT Id,(SELECT Id FROM Accounts) FROM Account]
I get this error:
"Didn't understand relationship 'Accounts' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names."
Is this possible?
[SELECT Id,(SELECT Id FROM Contacts) FROM Account]
Is this possible to do with child accounts? (Using the Standard "Parent" field)
When I attempt this:
[SELECT Id,(SELECT Id FROM Accounts) FROM Account]
I get this error:
"Didn't understand relationship 'Accounts' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names."
Is this possible?
-
- Stephen E 4
- February 27, 2018
- Like
- 0
- Continue reading or reply
Question about bulk loads running in serial
Hello!
We have a few programs that bulk load data in to Salesforce nightly. My question is: If we bulk load two data sets in serial (One load for accounts, the other for cases) will both loads run in serial? (i.e. accounts are loaded first, then cases) or will they run side by side and load data to their respective objects?
We have a few programs that bulk load data in to Salesforce nightly. My question is: If we bulk load two data sets in serial (One load for accounts, the other for cases) will both loads run in serial? (i.e. accounts are loaded first, then cases) or will they run side by side and load data to their respective objects?
-
- Stephen E 4
- October 10, 2017
- Like
- 0
- Continue reading or reply
Concurrency issues during salesforce bulkload nightly jobs
Hello,
We use The salesforce API to bulkload records from our ERP system in to SF nightly. However, we are running in to an issue.


We regularly run in to the 'TooManyLockFailure' error. We did some googling and read a few threads on concurrency and bulkloads (i.e. running things in serial so nothing bumps in to each other)
However the above is still happening, is there any way to better handle/avoid this error? Salesforce says it retries the batch but it has never once succeeed. This error seems to happen randomly, after we notice records have failed, we run the program again with no issue. What gives?
We use The salesforce API to bulkload records from our ERP system in to SF nightly. However, we are running in to an issue.
We regularly run in to the 'TooManyLockFailure' error. We did some googling and read a few threads on concurrency and bulkloads (i.e. running things in serial so nothing bumps in to each other)
However the above is still happening, is there any way to better handle/avoid this error? Salesforce says it retries the batch but it has never once succeeed. This error seems to happen randomly, after we notice records have failed, we run the program again with no issue. What gives?
-
- Stephen E 4
- September 05, 2017
- Like
- 0
- Continue reading or reply
Parsing XML using Dom on more complex xml?
I am currently trying to parse an XML response, however it does not seem to want to parse whats being returned, and im not sure if its because of the complexity of the response, or if im doing something wrong.
I am using HttpRequests to send requets to our api.
Here is the xml the API responds with:
I use Dom.Document doc = res.getBodyDocument(); to get the document from the HTTP response.
When I call Dom.XMLNode rootele = doc.getRootElement(); and put it in a system.debug, it doesnt really make much sense, returns something like:
when I call getChildElement on this, it returns null, everytime. I have tried calling getChildElement('Envelope',null), getChildElement('Body',null) and many others. Always returns null. Am i doing something wrong?
I am using HttpRequests to send requets to our api.
Here is the xml the API responds with:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getGLBranchResponse xmlns="our end point is here"> <getGLBranchResult> <Branch> <ID> <Value>int</Value> <Valid>boolean</Valid> </ID> <Code> <Value>string</Value> <Valid>boolean</Valid> </Code> </Branch> <BranchName> <Value>string</Value> <Valid>boolean</Valid> </BranchName> <Customer> <ID> <Value>int</Value> <Valid>boolean</Valid> </ID> <Code> <Value>string</Value> <Valid>boolean</Valid> </Code> </Customer> <DefaultWarehouse> <ID> <Value>int</Value> <Valid>boolean</Valid> </ID> <Code> <Value>string</Value> <Valid>boolean</Valid> </Code> </DefaultWarehouse> <MainBranch> <Value>boolean</Value> <Valid>boolean</Valid> </MainBranch> <Active> <Value>boolean</Value> <Valid>boolean</Valid> </Active> </getGLBranchResult> </getGLBranchResponse> </soap:Body> </soap:Envelope>
I use Dom.Document doc = res.getBodyDocument(); to get the document from the HTTP response.
When I call Dom.XMLNode rootele = doc.getRootElement(); and put it in a system.debug, it doesnt really make much sense, returns something like:
[13]|DEBUG|XMLNode[ELEMENT,Envelope,http://schemas.xmlsoap.org/soap/envelope/,null,[common.apex.api.dom.XmlNode$NamespaceDef@c2d03a7, common.apex.api.dom.XmlNode$NamespaceDef@59ff7f61, common.apex.api.dom.XmlNode$NamespaceDef@32f5bbfc],[XMLNode[ELEMENT,Body,http://schemas.xmlsoap.org/soap/envelope/,null,null, etc
when I call getChildElement on this, it returns null, everytime. I have tried calling getChildElement('Envelope',null), getChildElement('Body',null) and many others. Always returns null. Am i doing something wrong?
-
- Stephen E 4
- August 30, 2017
- Like
- 0
- Continue reading or reply
Getting errors when writing to ObjectTerritory2Association via the API
Hello,
We are currently trying to write a program that will auto assign territories to an account. However we are getting the below error:
Association Cause: bad value for restricted picklist field: Manual
If I attempt to remove this from the api call, it tells me that Association Cause is required. How am I supposed to write to this field?(What am I supposed to write to this field?) Can I change this to an unrestricted picklist?
We are currently trying to write a program that will auto assign territories to an account. However we are getting the below error:
Association Cause: bad value for restricted picklist field: Manual
If I attempt to remove this from the api call, it tells me that Association Cause is required. How am I supposed to write to this field?(What am I supposed to write to this field?) Can I change this to an unrestricted picklist?
-
- Stephen E 4
- July 21, 2017
- Like
- 0
- Continue reading or reply
Questions about Custom console components on cases
Hello all.
I have two questions regarding custom console components used on the page layouts of cases:
1. When the page loads, the right side panel is always loaded and tabed out. But the left side panel is always hidden and we have to click on the arrow to get it to show up. Why does the right side show up but not the left? How can we choose which panels automatically show up on the page without having the click the arrow?
2. Width px does not seem to work. We have one panel with two related lists. It doesnt matter if you set the width to 1 or 9000. it stays the same. Does anyone know why?
I have two questions regarding custom console components used on the page layouts of cases:
1. When the page loads, the right side panel is always loaded and tabed out. But the left side panel is always hidden and we have to click on the arrow to get it to show up. Why does the right side show up but not the left? How can we choose which panels automatically show up on the page without having the click the arrow?
2. Width px does not seem to work. We have one panel with two related lists. It doesnt matter if you set the width to 1 or 9000. it stays the same. Does anyone know why?
-
- Stephen E 4
- July 07, 2017
- Like
- 0
- Continue reading or reply
How to stop a user from viewing the options on 'My Settings'?
We are currently setting up a very limited profile (No access but to a very specific visual force page) that will be used by contractors. When they log in, it automatically takes them to the visual force page, which is what we want. However, if the user were to edit the URL (removing /apex/mypage/ from the url) they will be taken to the normal salesforce home page. we have removed all acess to apps and hidden all tabs, they have no permission to any object and they have no system permissions. However, they are still able to go to 'My settings' and mess with things we do not want them to be able to. How can we remove access to their settings? (i.e. they can still make groups, which they shouldnt be able to)
-
- Stephen E 4
- June 15, 2017
- Like
- 0
- Continue reading or reply
Getting an error in developer console, but log wont give me any details
Hello!
I am getting a "Attempt to de-reference a null object" error in the developer console. I go to the log section and double click on the log, and find the error message. Though it doesnt tell me anything about what the cause is or where its coming from... all it says is "12:24:10:089 FATAL_ERROR System.NullPointerException: Attempt to de-reference a null object"
is there anyway I can view the full strack trace? (Would like to see line, column, variable, etc).
I am getting a "Attempt to de-reference a null object" error in the developer console. I go to the log section and double click on the log, and find the error message. Though it doesnt tell me anything about what the cause is or where its coming from... all it says is "12:24:10:089 FATAL_ERROR System.NullPointerException: Attempt to de-reference a null object"
is there anyway I can view the full strack trace? (Would like to see line, column, variable, etc).
-
- Stephen E 4
- June 02, 2017
- Like
- 0
- Continue reading or reply
how to stop actions from showing up on the feed tab
We have a action that creates an opportunity from a case. When we put the action (which calls a flow) on the page layout, it does not show up with all the other actions or buttons, but rather it shows up on the feed tab on the page. How can we change this? Users do not want this on the feed tab, they want it at the top of the page with the rest of the buttons.
- Stephen E 4
- November 13, 2018
- Like
- 0
- Continue reading or reply
[2018] How to schedule an Apex job to run every 10 minutes?
We replicate tickets/data from external APIs and would like if we could create tickets every 10 minutes. Is that possible with scheduled apex? I have been getting a lot of conflicting answers when googling (and a lot of answers are very old, dating back to 2011.)
Thank you!
Thank you!
- Stephen E 4
- April 13, 2018
- Like
- 0
- Continue reading or reply
Is it possible to grab child accounts in a single SOQL query?
For example, if I wanted to grab accounts and their contacts in a single SOQL query I could do this:
[SELECT Id,(SELECT Id FROM Contacts) FROM Account]
Is this possible to do with child accounts? (Using the Standard "Parent" field)
When I attempt this:
[SELECT Id,(SELECT Id FROM Accounts) FROM Account]
I get this error:
"Didn't understand relationship 'Accounts' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names."
Is this possible?
[SELECT Id,(SELECT Id FROM Contacts) FROM Account]
Is this possible to do with child accounts? (Using the Standard "Parent" field)
When I attempt this:
[SELECT Id,(SELECT Id FROM Accounts) FROM Account]
I get this error:
"Didn't understand relationship 'Accounts' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names."
Is this possible?
- Stephen E 4
- February 27, 2018
- Like
- 0
- Continue reading or reply
What is wrong with this SOQL Query?
Hello!
I am trying to write some SOQL so that I can perform some bulk operations on opportunties. However, whenever I run this SOQL I get an error: "unexpected token: AND"
Here is the SOQL:
Here is the System.debug output:
I am just unsure what is wrong with this SOQL, seems I am escpaing the single quotes correctly...
Thank you!
I am trying to write some SOQL so that I can perform some bulk operations on opportunties. However, whenever I run this SOQL I get an error: "unexpected token: AND"
Here is the SOQL:
String query2 = 'SELECT Id FROM Opportunity WHERE NOT StageName LIKE \'%'+'closed'+'%\' AND division__c = \'IT Solutions\'';
Here is the System.debug output:
SELECT Id FROM Opportunity WHERE NOT StageName LIKE '%closed%' AND division__c = 'IT Solutions'
I am just unsure what is wrong with this SOQL, seems I am escpaing the single quotes correctly...
Thank you!
- Stephen E 4
- May 01, 2017
- Like
- 0
- Continue reading or reply
List has more than 1 row for assignment to SObject... but we need to display more than one row.
I am trying to do a summary a a custom time object we have for Cases. I have embded the VFP on a cases page layout. When people enter time, it groups together the person entering the time, and the amount they have billed. But I keep getting the 'List has more than 1 row for assignment to SObject' error. I am not sure why, this query will 99% percent of the time have more than 1 record (or more than 1 person entering records) because of how our cases work. Why cant I display more than 1 record? Other Programs we have made will return multipe records and then we loop through them on the VFP to display. Not sure why there is a limit on this program though.
Code:
Code:
public class TimeSummaryController { public string caseid {get;set;} private final Case cc; public AggregateResult timeq {get;set;} public TimeSummaryController(ApexPages.StandardController stdController){ this.cc = (Case)stdController.getRecord(); } public AggregateResult getTimes(){ try { timeq = [SELECT Engineer_Name__r.Name enr,SUM(Total_Billed__c)total_billed FROM Time__c WHERE Case__c = :cc.Id GROUP BY Engineer_Name__r.Name ORDER BY SUM(Total_Billed__c) DESC]; }catch(Exception e){ System.debug(e); ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'No Time To Display')); return null; } return timeq; } }
<apex:page standardController="Case" extensions="TimeSummaryController" showHeader="false"> <apex:pageMessages ></apex:pageMessages> <apex:pageBlock> <apex:pageBlockTable value="{!Times}" var="tt" id="rr"> <apex:column value="{!tt['enr']}"/> <apex:column value="{!tt['total_billed']}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>
- Stephen E 4
- March 29, 2017
- Like
- 0
- Continue reading or reply