• Norm Sherman SF
  • NEWBIE
  • 85 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 31
    Replies
If a case is attached to the account, you are the case owner , will you be able to see the account?
I am trying to pass a value from a VF form into my controller, however the parameter is always staying as Null.
VF Code:
<apex:repeat value="{!ProdCVSiteInfo}" var="p">     
        <apex:commandButton value="Add" action="{!addProd}" style="vertical-align: top; padding:3px;">
            <apex:param name="selectedProducts" value="{!p.Id}" assignTo="{!selectedProducts}"/>  
        </apex:commandButton>
</apex:repeat>

Controller
public String selectedProducts {
get;
set {selectedProducts = value;}
}

Where am I going wrong as i have done this previously and the code looks the same, can't seem to see the error.


Is it possible to insert a feedItem and set the ParentId as a lookup to an object with external id.

For example, outside of Chatter, I can insert a record like this:
'CustomRelationship__r':{'CustomKey__c':'aaaaaa'}

How can I do the same with ParentId?

Cheers
I'm building a mobile app with Salesforce1 and would like to call the Camera. How is this achievable?

With PhoneGap/Cordova I have a nice set of APIs to work with.

Does Salesforce1 inherit Phonegap functionality?

Hi All,

 

Here is a real kicker!

 

I have a Number field defined as 18,0, which should by definition should not include decimal places.

 

When I use the frontend to enter a new value, it displays perfectly fine with no decimal places.

 

However when I perform a SOQL query I am getting a single decimal place, i.e. 11.0, 12.0, 13.0 instead of 11, 12, 13.

 

This also occurs when I use the web servers API and it is causing my external processes grief because the field should be INT.

 

What could be the cause for having mixed convesion between the frontend and backend?

 

 

I'm building a mobile app with Salesforce1 and would like to call the Camera. How is this achievable?

With PhoneGap/Cordova I have a nice set of APIs to work with.

Does Salesforce1 inherit Phonegap functionality?
Is it possible to insert a feedItem and set the ParentId as a lookup to an object with external id.

For example, outside of Chatter, I can insert a record like this:
'CustomRelationship__r':{'CustomKey__c':'aaaaaa'}

How can I do the same with ParentId?

Cheers
Hi Friends
I am new to salesforce so i am struggling abit ...with the coding so please kindly help ....... 
i want to write a test for an employee object and the class name is employee this class written by me to use in  Vf pages 
 i have created a employee object using this class in vf pages..... so now i want to test the class so i am getting error ...plase help class i wrote is 

public with sharing Class Employee
{

public String Name {get; set;}
public String Qualification {get; set;}
public Integer Age {get; set;}
public Integer Salary{get; set;}
Public String Desig{get; set;}

public list<Employee__c> getEmployeeList{get;set;}

public String getName() {
        return 'Employee';
    }
public pageReference save() {    
  Employee__c E = new Employee__c (
                           Name__c = Name,
                          
                           Desig__c = Desig,
                           Age__c = Age ,
                           Salary__c = Salary,
                           Qualification__c = Qualification   );
                    insert E;
                   
                    
                    PageReference nextPage = new PageReference('/' + E.Id);
                   
        return nextPage;
                    }
                    public PageReference saveAndNew() { 
          Employee__c Emp = new Employee__c (
                           Name__c = Name,
                          
                           Desig__c = Desig,
                           Age__c = Age ,
                           Salary__c = Salary,
                           Qualification__c = Qualification   );
         insert Emp;
      return (new ApexPages.StandardController(new Employee__c())).edit();     
     
    
    } 

public pageReference Clear()
{
pageReference page = new pageReference('https://ap1.salesforce.com/a03/o');
page.setRedirect(true);
return page;
}

public List<Employee__c> EmployeeList()
  {

     getEmployeeList = [select Name__c, Salary__c from Employee__c];
     return getEmployeeList;

}

public PageReference GetList()
{
     EmployeeList();
     return null;
}
}


and the Test class  I  wrote is
 
ERROR :System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Name__c]: [Name__c]



And i have only one required field in employee object 
Name__c  and data type is    Text(20)
rest of the fields are 
Desig__c 
  Age__c 
Salary__c 
Qualification__c


@istest
public class Testclass
{

public static testmethod void Employee()
{

Employee e = new Employee();

Employee__c empc = new Employee__c();

empc.Name__c = 'Test Name';
empc.Desig__c = 'Testy Designation';
empc.Age__c = 18;
empc.Salary__c = 100;
empc.Qualification__c = 'BE';

insert empc;

e.save();
e.saveAndNew();
e.Clear();
e.GetList();

}
}



Thanks in Advance 
  • January 27, 2014
  • Like
  • 0
If you write a apex class and call it in the trigger, will you be able to avoid the governor limits?
If a case is attached to the account, you are the case owner , will you be able to see the account?
Can a profile have multiple Record types?
I'm working on a custom tab that will show in Salesforce1 app. I wrote my own custom Visualforce page but I would like to create a search box in the Salesforce1 header as suggested in style guide. 
 Salesforce1 Header Search

My question is:
1. Is there a way to put my own search box to the header in my own Visualforce page?
2. Is there a way to display back button instead of a menu item as my Visualforce page does partial refreshes of the page and I would like the user to be able to go back using that button?

Thanks!
I am trying to update custom_field__con Opportunity from a Multi Select picklist field on Account only if Account Name contains 'x'. I am new to Apex, could someone help me out here. Thanks!
I have what I think is a pretty simple issue.  I'm developing a program that will run a number of queries nightly and populate a 'snapshot' object.  This object has fields such as Date and NumberOfContacts so that we can track growth over time.  However, when I do a query that returns over 50K records (i.e. SELECT count(Name) FROM CONTACT WHERE Active__c = TRUE) I get the 50001 query row message.

I can run this query easily in the Developer Console to get my results even if well over 50K.  I looked into dividing the query up into different segments (i.e. by CreatedDate) and using a Batchable class.  Both of these seemed like a fair amount of effort to simply run a query.  I figured I'd ask here to see if there's a better way to do this.

I do plan on putting this into a scheduleable job that will run at 3:00 am or so.  Running the code manually in production is causing the problem.  I'm not sure if the scheduleable aspect alone will make a difference.

Thanks!!

 
I'm having trouble with a custom lead conversion, and I keep getting this error: "ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, accountId must be specified if contactId is not null:"

Would love some help!
In our org, we have two users whose records are returned twice when called via APEX, or via the API.

If this SOQL is executed:

Selected Id, LastViewedDate, LastReferencedDate from User where Id='005xxxxxxx'

is executed in our org, you can see where the same result is returned twice. In fact, if you include a "limit 1" on the end of that SOQL query, it STILL returns those two, identical results.

If both LastViewedDate and LastReferencedDate are removed from the query, only one result is returned for each record, which is the expected, normal behavior.

Anyone else seen anything strange like this?
I am trying to pass a value from a VF form into my controller, however the parameter is always staying as Null.
VF Code:
<apex:repeat value="{!ProdCVSiteInfo}" var="p">     
        <apex:commandButton value="Add" action="{!addProd}" style="vertical-align: top; padding:3px;">
            <apex:param name="selectedProducts" value="{!p.Id}" assignTo="{!selectedProducts}"/>  
        </apex:commandButton>
</apex:repeat>

Controller
public String selectedProducts {
get;
set {selectedProducts = value;}
}

Where am I going wrong as i have done this previously and the code looks the same, can't seem to see the error.


Hi,

How to integrate your apps with salesforce1 today app ? Is it possible to do this? If so, could someone point me to an example or documentation?

Thanks,

Nikhil
Is there a way to download all workflows from eclipse?
Hi,

Till now we have been coding using Eclipse without any Version Control and we are asked to use a Version Control to avoid Code Conflicts.
Which is good Version Control tool for Force.com code like Apex and Visualforce and how to set up it?


Many Thanks.