• Stephen E 4
  • NEWBIE
  • 80 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 6
    Replies
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 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. 

User-added image
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 ?
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 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?
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.
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. 
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)
<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?
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?
<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>

 
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 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!
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. 


User-added image
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?
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? 
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. 


User-added image


User-added image


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?
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:
 
<?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? 
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?
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?
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)


User-added image
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). 
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. 

User-added image
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!
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?
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:
 
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!
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:
 
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>