• sf sharath
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 6
    Replies

how to create a formula field in account object?

pls explain with navigation

 

 

help me plssssssssss

how to create a user in salesforce? pls help me with navigation

Error: Compile Error: unexpected token: ':' at line 3 column 20

 

 

 

trigger employeetrigger on employeec__c (before insert,before update)
{
for(employeec__c : trigger.new)
{
if(country__c == null)
{
country__c='India';
}
}
}

 

Error: classba Compile Error: Illegal assignment from LIST<Account> to LIST<account> at line 11 column 7



 

public with sharing class classba {
public String accName { get; set; }
List<Account> lstaccount = new List<Account>();
List<contact> lstcontacts = new List<contact>();
set<string> accIds = new set<string>();
public List<contact> getConRecords() {
lstcontacts.clear();
accIds.clear();
lstaccount.clear();
system.debug('****AccNameTextValue is *****'+accName);
lstaccount=[select id,name,phone from Account where name=:accName];
for(Integer i=0;i<lstaccount.size();i++)
{
accIds.add(lstaccount[i].Id);
}
lstcontacts =[select id,name,phone from contact where accountid in : accIds];
system.debug('**** List of Contacts for Test is ***'+lstcontacts);
return lstcontacts;
}
public pagereference showContacts() {
return null;

}
}

 

<apex:page controller="classba" sidebar="false">
<apex:form >
<apex:inputText value="{!accName}"/>
<apex:commandButton value="search" action="{!showcontacts}"/>
<apex:actionstatus id="mystatus" starttext="please wait it is loading contacts.......">
<apex:facet name="stop">
<apex:outputpanel id="out">
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!conRecords}" var="c">
<apex:column headerValue="Contacts">
{!c.Name}
</apex:column>
<apex:column headerValue="Phone" value="{!c.phone}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:outputpanel>
</apex:facet>
</apex:actionstatus>
</apex:form>
</apex:page>

can u explain the meanig of this error 1 and 2

\ErrorError: Unknown property 'classba.accName'

 1.create apex property 'classba.accName'

2.create apex method 'classba.getaccName'

 

 

 

 

<apex:page controller="classba" sidebar="false">
<apex:form>
<apex:inputText value="{!accName}"/>
</apex:form>
</apex:page>

 

 

public with sharing class classba {
}

 

 

 

<apex:page controller="input">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputField value="{!a.name}"/>
<apex:inputField value="{!a.phone}"/>
<apex:inputField value="{!a.industry}"/>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

 

public class input {
public account a{get;set;}
public input(){
id id1 = ApexPages.currentpage().getParameters().get('id');
if(id1<>null)
{
a= [select id,name,industry,phone from account where id = :id1];
}
else
{
a = new account();
}}
public PageReference save() {
upsert a;
a= new account();
return (new ApexPages.StandardController(a).view());
}
}

Error: input Compile Error: Illegal assignment from LIST<Account> to account at line 8 column 3. please tell me the error meaning

 

 

 

 

 

 

public class input {
public account a{get;set;}
public input()
{
id id1 = ApexPages.currentpage().getParameters().get('id');
if(id1<>null)
{
a= [select id,name,industry,phone from account where id = :id1];
}
else
{
a = new account();
}
}

public PageReference save() {
upsert a;
a= new account();
return (new ApexPages.StandardController(a).view());
}

}

 

 

 

 

<apex:page controller="input">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputField value="{!a.name}"/>
<apex:inputField value="{!a.phone}"/>
<apex:inputField value="{!a.industry}"/>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>

list<string> colors = new list<string>{'Black'};

 

  colors.add('Pink');

  colors.add('Yellow');

  system.debug('color in 1 index :'+colors.get(1));

  colors.add('Green');

  colors.set(1,'Blue');

system.debug('color in 1 index :'+colors.get(1));

system.debug('color size :'+colors.size());

  colors.clear();

system.debug('color size after clear :'+colors.size());

 

set<string> colors = new set<string>{'Black'};

colors.add('Pink');
colors.add('Yellow');
colors.add('Yellow');
system.debug('color size :'+colors.size());
colors.remove('Pink');
system.debug('color size after clear :'+colors.size());

set<account> s = new set<account>();
for(account b : acc)
{
s.add(b);
}
system.debug('set size after clear :'+s.size());

Error: Compile Error: unexpected token: ':' at line 3 column 20

 

 

 

trigger employeetrigger on employeec__c (before insert,before update)
{
for(employeec__c : trigger.new)
{
if(country__c == null)
{
country__c='India';
}
}
}

 

Error: classba Compile Error: Illegal assignment from LIST<Account> to LIST<account> at line 11 column 7



 

public with sharing class classba {
public String accName { get; set; }
List<Account> lstaccount = new List<Account>();
List<contact> lstcontacts = new List<contact>();
set<string> accIds = new set<string>();
public List<contact> getConRecords() {
lstcontacts.clear();
accIds.clear();
lstaccount.clear();
system.debug('****AccNameTextValue is *****'+accName);
lstaccount=[select id,name,phone from Account where name=:accName];
for(Integer i=0;i<lstaccount.size();i++)
{
accIds.add(lstaccount[i].Id);
}
lstcontacts =[select id,name,phone from contact where accountid in : accIds];
system.debug('**** List of Contacts for Test is ***'+lstcontacts);
return lstcontacts;
}
public pagereference showContacts() {
return null;

}
}

 

<apex:page controller="classba" sidebar="false">
<apex:form >
<apex:inputText value="{!accName}"/>
<apex:commandButton value="search" action="{!showcontacts}"/>
<apex:actionstatus id="mystatus" starttext="please wait it is loading contacts.......">
<apex:facet name="stop">
<apex:outputpanel id="out">
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!conRecords}" var="c">
<apex:column headerValue="Contacts">
{!c.Name}
</apex:column>
<apex:column headerValue="Phone" value="{!c.phone}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:outputpanel>
</apex:facet>
</apex:actionstatus>
</apex:form>
</apex:page>

Error: input Compile Error: Illegal assignment from LIST<Account> to account at line 8 column 3. please tell me the error meaning

 

 

 

 

 

 

public class input {
public account a{get;set;}
public input()
{
id id1 = ApexPages.currentpage().getParameters().get('id');
if(id1<>null)
{
a= [select id,name,industry,phone from account where id = :id1];
}
else
{
a = new account();
}
}

public PageReference save() {
upsert a;
a= new account();
return (new ApexPages.StandardController(a).view());
}

}

 

 

 

 

<apex:page controller="input">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputField value="{!a.name}"/>
<apex:inputField value="{!a.phone}"/>
<apex:inputField value="{!a.industry}"/>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>