• Steven Houghtalen
  • NEWBIE
  • 115 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 33
    Replies
Here is the error message: Error: Compile Error: Cannot save a trigger during a parse and save class call at line -1 column -1

I stripped everything out of the class and still get it.  Hope someone can help.

trigger TrafficShadow on Traffic__c ( after update, after insert) {
}
 
I would like to know how I can have a system administrator user id default to classic when they logon.  I have 3 users that are system administors and can get two of them to work this way if I clone the orignial system admin profile and name it system admin custom and then uncheck Lightning Experience User in that profile.  One of the userids, however will not allow me to change the profile from System Administor.  I hope somone can help.  
I am unable to make an existing app visible in lightning experience.  Most of my apps are visiable but a few are not.  They are not console apps.  I am not able to check the checkbox to make them visible.  I hope someone can help me.  Thank you.
I have a very complex report that required developing code for several hundred queries which have been completed.   Now the requirements have changed (naturally).   The queries were developed to use a Houseing Grant field as a filter where the field could contain one of two possible strings in a variable named 'Grant' ('Grant-A' or 'Grant-B').  (See below) 

The new requrirement is to make the Grant field a multiselect field such that all the queries could be made by 'Grant-A'  or 'Grant-A' or 'Grant-B'.   I thought I could do this by simply mass changing all the queries to use an Include clause but it appears that the Include clause can only use literals.   I looked at using dynamic SOQL but that would be a huge amount of work as the SOQL statements vary signficantly.  Does anyone have any suggestions on how to solve this problem? 

List<AggregateResult> results1 = [Select Count (Client__c) ClientCount
            From Transitional_Housing__c 
            Where Project_Entry_Date__c <=: EndDate
                AND (Project_Exit_Date__c >=: StartDate 
                  OR  Project_Exit_Date__c =: null)
              AND Housing_Grant__c =: Grant 
              AND Client__r.Age__c >=: 18
              ]; 
Do I really need to switch to lightning?   A good number of my users get confused on pretty basic changes.   I don't see any benefit of a new users interface for our applications.    It appears that Salesforce is really pushing it hard and their help communiciations almost make it sound like there isn't a choice.   Need some guidence.   Thanks.
I work for a non profit and need to periodically export a large number (60) of CSV files for gov't reporting.   I have looked through a lot tools to do this and for those that I reviewed, they all have short comings - mostly you need to do them one at a time.   Exporting them one at a time is too labor intensive when you have to do so many of them so often.  So far, I haven't found any solution so am wondering if someone has some ideas on how to do this or know of already developed solutions.  Additionally the names of these csv files change every month so would like to manage the naming under program control.   Thank you.   Steve 
Greetings,  I am having trouble deploying reports from one org to another using eclipse.  I am a relative new user of eclipse.  I created 2 projects one of the source and one of the destination.  I copy the report folder from the source and paste it in the appropriate place in the destination.  I then save to the server.  I get no errors or warnings when I do this.  I log onto the destination org and all the reports are there.  Great !!!  There are a hundred of them....what a relief.  But, when I look at the reports, the filters are all missing and I am going crazy trying to determine how to resolve.  When I look at the source xml (in eclipse) of both projects, the filters are there but are missing when I open the reports on SF.   Hopefully someone can help me.  Thank you.
I am trying to create a package of 6 objects and their fields to share with another organzation.  These 6 objects are just but a few that I have developed.  When I create the package, it sucks in dozens of other objects, views, etc.  Really, I just want the objects and their fields. It looks like you can add more components but there is no way to delete say objects nor the fields in the 6 objects that caused them to be sucked in. 

Additionally, I have apex classes but did not specify that I wanted them as part package, however, when I try to upload, it says it is missing apex test classes. 

I thought this should be a simple task but it is turning into an entanglement nightmare.  

Is there a simple approach to achieve what I am trying to accomplish?   Thanks.
Steve 
I have created three pages/code that the user sequences through and it all works fine.  On the second page, I have added some error checking code and want to display an error message and allow the user to fix the entry.  If there is no error, I want to continue on to the third page.  I can't seem to find a way to make it display the error message and stay on the same page.  Hopefully someone can help.

Here is a partial copy of the code where the error checking takes place along with the 2nd visualforce page.

       If (cpin == ClientRegisteredPin){
             
            for(Meds__c m :Meds) {
                Med_Log__c mlrec = new Med_Log__c();
                If (m.Dose_Taken__c <> null) {
                    mlrec.Dose_Taken__c = m.Dose_Taken__c;
                    mlrec.Count__c = m.Count__c;
                    mlrec.Client_Pin__c = cpin;
                    mlrec.As_Prescribed__c = m.As_Prescribed__c;
                    mlrec.Name_of_Med__c = m.Name_of_Med__c;
                    mlrec.Active__c = m.Active__c;
                    mlrec.Client__c = m.Client__c;
                    mlrec.Dosage__c = m.Dosage__c;
                    mlrec.Frequency__c = m.Frequency__c;
                    mlrec.Controlled_Drug__c = m.Controlled_Drug__c;
                    mlrec.Count_In__c = m.Count_In__c;
                    mlrec.Count_Out__c = m.Count_Out__c;
                    mlrec.Date__c = datetime.now();
                    mlrec.Staff__c = staffname;
                    MedsLog.add(mlrec);
                }
            }

            
            Insert MedsLog;
            
            for(Meds__c m :Meds) {
                m.Dose_Taken__c = null;
                m.Count__c = null;
                m.Client_Pin__c = null;
                m.As_Prescribed__c = false;
                m.Date__c = null;
                m.Count_In__c = null;
                m.Count_Out__c = null;
                
            }
            Update Meds;
            
    
            PageReference MedsPage = Page.MedSelClient;
            MedsPage.setRedirect(true);
            return MedsPage;
        }
        Else{
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Invalid Pin - re-enter or enter Master Pin'));
            PageReference MedsPage = Page.LogMeds;
            MedsPage.setRedirect(false);
            return MedsPage;
            
        }  

<apex:page Controller="LogMeds"  sidebar="false">
    <apex:pageBlock title="Medication Record for {!clientname}"/>
   <apex:form >
    <apex:pageBlock >
    <apex:pageMessages id="showmsg"></apex:pageMessages>
          <apex:pageBlockButtons >
            <apex:commandButton value="Save" action="{!save}" rerender="showmsg"/>
          </apex:pageBlockButtons>
          <b>Select witnessing staff member</b> &nbsp;  
         <apex:InputField value="{!clo.Staff__c}" required="true" style="width:100px"/>
         <b>Enter Client Pin</b> &nbsp;
         <apex:InputField value="{!clo.Client_PIN__c}" required="true" style="width:100px"/>
        
          <apex:pageBlockTable value="{!Meds}" var="ml">
            <apex:column value="{!ml.Name_of_Med__c}"/>
            <apex:column value="{!ml.Controlled_Drug__c}"/>
            <apex:column value="{!ml.Expiration_Date__c}"/>                 
            <apex:column value="{!ml.Dosage__c}"/> 
            <apex:column value="{!ml.Frequency__c}"/>
            <apex:column headerValue="Dose Taken">
                <apex:InputField value="{!ml.Dose_Taken__c}"  style="width:100px"/>
            </apex:column>
           
            <apex:column headerValue="Taken as Prescribed" >
                <apex:InputField value="{!ml.As_Prescribed__c}"/>
            </apex:column>
            <apex:column headerValue="Count Out">
                <apex:InputField value="{!ml.Count_Out__c}" style="width:100px"/>
            </apex:column>
            <apex:column headerValue="Count In">
                <apex:InputField value="{!ml.Count_In__c}" style="width:100px"/>
            </apex:column>
          </apex:pageBlockTable>
    </apex:pageBlock>
 </apex:form>
 </apex:page>
                               
 
More specifically, can Salesforce respond to the subpoena and provide the data without my companie's knowledge (blind subpoena)?
I get a compile error with the following code and can't figure out how to resolve.  Could use some help...thank you.

public class testexcept{
    string a = 'temp';
    string b = 'test';
    
    public static void jamen(){
        // main code here    
    }   
        
    catch (Exception e) {
    // Process exception here/    
    }
    
}
I want to have two different apps use the Contacts object, but I want to have a different page lay out for the different apps.  And, I want some profilesl to be able to select either app.  As an example, if a user selects app#1, they see the contact page layout for that app, and if they select app#2, they see a different page layout.   Is this possible and how is it done?  Thanks for your assistance.
Does anyone know how to convert an ID into a name value in Apex (not a formula)?  Thanks 
Greetings,  I hope someone can help me with this. I am developing a custom controller which uses inputfield in the visualpage.  Where  I am stumped is how to capture that data in a variable.  The visualforce page and the controller are listed below.  I have stripped much of the lines from each to only focus on the issue I am having.  Meds__c is a custom object which contain a lookup field Staff__c.  When I execute this code, I get a null pointer exception on the "staff = meds.staff__c;" line.  Thank you.

<apex:page Controller="DispMeds"  sidebar="false">
    <apex:pageBlock title="Test - DispMeds "/>
   <apex:form >
     <apex:pageBlock >
      <apex:inputfield value="{!meds.Staff__c}"/>
    </apex:pageBlock>
  </apex:form
</apex:page>


public with sharing class DispMeds {
    Public Id Client {get;set;}
    public  Meds__c  meds {get;set;}
    Public string staff;
    public DispMeds(){
        system.debug('Start of Controller');
        ID ClientID = ApexPages.currentPage().getParameters().get('id');
        staff = meds.staff__c;
        system.debug('Staff = ....' + staff);
    }
}

 
I have a custom object - services log, where I log every service performed for every client.  I need to form a query to determine how many clients were served during a defined period. This query will be used in conjuction with Conga Composer to produce a report so I can't compliment the query with some apex code. Can anyone help me define a query that would do this?  I am stumped. 
I am trying to pull a field from one non related object and put it in a different object.  Something like vlookup in excel.  Thanks for any help on this.
I am hoping someone can help me with this.  I want to perform a simple table join but I find the documenation very difficult to get to the right solution.  Here are the 2 tables (custom objects):
Service Log (custom object)
ClientID  Date of Service
24          12/16/16
34           12/1/16
15           12/20/16

Client (custom object)
ClientID       Language
24            Spanish
12            English
34            French
15            Mandrin


I want the resulting table (list) to contain the language for every record in the Service Log.  The list would have the followiong fields:
ClientID     Date of Service   Language

Hope someone can help me by showing me the needed query and perhaps point me to better documentation on how to perform the different types of table joins.
Thanks
 
I have a problem I don’t know how to solve and hoping someone can help.  I have an object which is a services log for clients that have had services.  The service log contains customer ID, date of service, type of service, etc.
I need to create a list of unique client IDs who have had services last month for the first time in the current fiscal year.  I have to run this on a monthly basis so dates can't be hardwired.
Hopefully someone has a brilliant solution.  Thank you.
 
Hi,  I am having trouble calling a method from execute anonymous windew.  I must be missing something simple as documented examples look similar.   I developed a very simple case to demonstrate. 
Here is what I place in the window.
TestX();
I click on execute and the error message is: Method does not exist or incorrect signature: TestX()

The apex class is as follows:

public class TestX {
    Public Static void TestX(){
        integer x;
        x=7; 
    }
 }
Here is the error message: Error: Compile Error: Cannot save a trigger during a parse and save class call at line -1 column -1

I stripped everything out of the class and still get it.  Hope someone can help.

trigger TrafficShadow on Traffic__c ( after update, after insert) {
}
 
I would like to know how I can have a system administrator user id default to classic when they logon.  I have 3 users that are system administors and can get two of them to work this way if I clone the orignial system admin profile and name it system admin custom and then uncheck Lightning Experience User in that profile.  One of the userids, however will not allow me to change the profile from System Administor.  I hope somone can help.  
I have a very complex report that required developing code for several hundred queries which have been completed.   Now the requirements have changed (naturally).   The queries were developed to use a Houseing Grant field as a filter where the field could contain one of two possible strings in a variable named 'Grant' ('Grant-A' or 'Grant-B').  (See below) 

The new requrirement is to make the Grant field a multiselect field such that all the queries could be made by 'Grant-A'  or 'Grant-A' or 'Grant-B'.   I thought I could do this by simply mass changing all the queries to use an Include clause but it appears that the Include clause can only use literals.   I looked at using dynamic SOQL but that would be a huge amount of work as the SOQL statements vary signficantly.  Does anyone have any suggestions on how to solve this problem? 

List<AggregateResult> results1 = [Select Count (Client__c) ClientCount
            From Transitional_Housing__c 
            Where Project_Entry_Date__c <=: EndDate
                AND (Project_Exit_Date__c >=: StartDate 
                  OR  Project_Exit_Date__c =: null)
              AND Housing_Grant__c =: Grant 
              AND Client__r.Age__c >=: 18
              ]; 
I work for a non profit and need to periodically export a large number (60) of CSV files for gov't reporting.   I have looked through a lot tools to do this and for those that I reviewed, they all have short comings - mostly you need to do them one at a time.   Exporting them one at a time is too labor intensive when you have to do so many of them so often.  So far, I haven't found any solution so am wondering if someone has some ideas on how to do this or know of already developed solutions.  Additionally the names of these csv files change every month so would like to manage the naming under program control.   Thank you.   Steve 
I have created three pages/code that the user sequences through and it all works fine.  On the second page, I have added some error checking code and want to display an error message and allow the user to fix the entry.  If there is no error, I want to continue on to the third page.  I can't seem to find a way to make it display the error message and stay on the same page.  Hopefully someone can help.

Here is a partial copy of the code where the error checking takes place along with the 2nd visualforce page.

       If (cpin == ClientRegisteredPin){
             
            for(Meds__c m :Meds) {
                Med_Log__c mlrec = new Med_Log__c();
                If (m.Dose_Taken__c <> null) {
                    mlrec.Dose_Taken__c = m.Dose_Taken__c;
                    mlrec.Count__c = m.Count__c;
                    mlrec.Client_Pin__c = cpin;
                    mlrec.As_Prescribed__c = m.As_Prescribed__c;
                    mlrec.Name_of_Med__c = m.Name_of_Med__c;
                    mlrec.Active__c = m.Active__c;
                    mlrec.Client__c = m.Client__c;
                    mlrec.Dosage__c = m.Dosage__c;
                    mlrec.Frequency__c = m.Frequency__c;
                    mlrec.Controlled_Drug__c = m.Controlled_Drug__c;
                    mlrec.Count_In__c = m.Count_In__c;
                    mlrec.Count_Out__c = m.Count_Out__c;
                    mlrec.Date__c = datetime.now();
                    mlrec.Staff__c = staffname;
                    MedsLog.add(mlrec);
                }
            }

            
            Insert MedsLog;
            
            for(Meds__c m :Meds) {
                m.Dose_Taken__c = null;
                m.Count__c = null;
                m.Client_Pin__c = null;
                m.As_Prescribed__c = false;
                m.Date__c = null;
                m.Count_In__c = null;
                m.Count_Out__c = null;
                
            }
            Update Meds;
            
    
            PageReference MedsPage = Page.MedSelClient;
            MedsPage.setRedirect(true);
            return MedsPage;
        }
        Else{
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Invalid Pin - re-enter or enter Master Pin'));
            PageReference MedsPage = Page.LogMeds;
            MedsPage.setRedirect(false);
            return MedsPage;
            
        }  

<apex:page Controller="LogMeds"  sidebar="false">
    <apex:pageBlock title="Medication Record for {!clientname}"/>
   <apex:form >
    <apex:pageBlock >
    <apex:pageMessages id="showmsg"></apex:pageMessages>
          <apex:pageBlockButtons >
            <apex:commandButton value="Save" action="{!save}" rerender="showmsg"/>
          </apex:pageBlockButtons>
          <b>Select witnessing staff member</b> &nbsp;  
         <apex:InputField value="{!clo.Staff__c}" required="true" style="width:100px"/>
         <b>Enter Client Pin</b> &nbsp;
         <apex:InputField value="{!clo.Client_PIN__c}" required="true" style="width:100px"/>
        
          <apex:pageBlockTable value="{!Meds}" var="ml">
            <apex:column value="{!ml.Name_of_Med__c}"/>
            <apex:column value="{!ml.Controlled_Drug__c}"/>
            <apex:column value="{!ml.Expiration_Date__c}"/>                 
            <apex:column value="{!ml.Dosage__c}"/> 
            <apex:column value="{!ml.Frequency__c}"/>
            <apex:column headerValue="Dose Taken">
                <apex:InputField value="{!ml.Dose_Taken__c}"  style="width:100px"/>
            </apex:column>
           
            <apex:column headerValue="Taken as Prescribed" >
                <apex:InputField value="{!ml.As_Prescribed__c}"/>
            </apex:column>
            <apex:column headerValue="Count Out">
                <apex:InputField value="{!ml.Count_Out__c}" style="width:100px"/>
            </apex:column>
            <apex:column headerValue="Count In">
                <apex:InputField value="{!ml.Count_In__c}" style="width:100px"/>
            </apex:column>
          </apex:pageBlockTable>
    </apex:pageBlock>
 </apex:form>
 </apex:page>
                               
 
I get a compile error with the following code and can't figure out how to resolve.  Could use some help...thank you.

public class testexcept{
    string a = 'temp';
    string b = 'test';
    
    public static void jamen(){
        // main code here    
    }   
        
    catch (Exception e) {
    // Process exception here/    
    }
    
}
I want to have two different apps use the Contacts object, but I want to have a different page lay out for the different apps.  And, I want some profilesl to be able to select either app.  As an example, if a user selects app#1, they see the contact page layout for that app, and if they select app#2, they see a different page layout.   Is this possible and how is it done?  Thanks for your assistance.
Does anyone know how to convert an ID into a name value in Apex (not a formula)?  Thanks 
Greetings,  I hope someone can help me with this. I am developing a custom controller which uses inputfield in the visualpage.  Where  I am stumped is how to capture that data in a variable.  The visualforce page and the controller are listed below.  I have stripped much of the lines from each to only focus on the issue I am having.  Meds__c is a custom object which contain a lookup field Staff__c.  When I execute this code, I get a null pointer exception on the "staff = meds.staff__c;" line.  Thank you.

<apex:page Controller="DispMeds"  sidebar="false">
    <apex:pageBlock title="Test - DispMeds "/>
   <apex:form >
     <apex:pageBlock >
      <apex:inputfield value="{!meds.Staff__c}"/>
    </apex:pageBlock>
  </apex:form
</apex:page>


public with sharing class DispMeds {
    Public Id Client {get;set;}
    public  Meds__c  meds {get;set;}
    Public string staff;
    public DispMeds(){
        system.debug('Start of Controller');
        ID ClientID = ApexPages.currentPage().getParameters().get('id');
        staff = meds.staff__c;
        system.debug('Staff = ....' + staff);
    }
}

 
I have a custom object - services log, where I log every service performed for every client.  I need to form a query to determine how many clients were served during a defined period. This query will be used in conjuction with Conga Composer to produce a report so I can't compliment the query with some apex code. Can anyone help me define a query that would do this?  I am stumped. 
I am hoping someone can help me with this.  I want to perform a simple table join but I find the documenation very difficult to get to the right solution.  Here are the 2 tables (custom objects):
Service Log (custom object)
ClientID  Date of Service
24          12/16/16
34           12/1/16
15           12/20/16

Client (custom object)
ClientID       Language
24            Spanish
12            English
34            French
15            Mandrin


I want the resulting table (list) to contain the language for every record in the Service Log.  The list would have the followiong fields:
ClientID     Date of Service   Language

Hope someone can help me by showing me the needed query and perhaps point me to better documentation on how to perform the different types of table joins.
Thanks