-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
38Questions
-
40Replies
how to create unique custom long text field in salesforce
how to create unique custom long text field in salesforce by trigger.?
-
- Shubham Sengar
- February 20, 2017
- Like
- 0
- Continue reading or reply
search page by vf
creating a search page if entered record is found then give as mess record it exist if not then gives a New button to create New record ..
this code is works for search but when m trying to add new button its gives error......
<apex:page StandardController="Work_Order__c" extensions="Search" showheader="true" action="{!redirect}">
<apex:form >
<apex:outputLabel >Enter The Work Order Number ::- </apex:outputLabel>
<apex:inputText value="{!searchText}"/><br/>
<apex:commandButton value="Search" Action="{!Search}"/><br/>
<apex:commandButton value="New" Action="{!createNew}" rendered="{!showNew}"/>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputText >Message: {!msg}</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
controller............
public class Search
{
public String SearchText{get;set;}
public Work_Order__c wo{get;set;}
public string msg{get;set;}
public boolean showNew { get; set;}
public Search(ApexPages.StandardController controller)
{
showNew = false;
}
public void search()
{
List<Work_Order__c> wolist=[select id,name from Work_Order__c];
for(Work_Order__c w:wolist)
{
if(w.name.containsIgnorecase(searchText))
wo=w;
}
if(wo==null)
{
msg='Work Order Number Not Exist u can create New by given link below';
showNew = true;
}
else
{
msg='Work Order Number already Exist' ;
showNew = true;
}
}
public PageReference createRecord() {
PageReference createPage=new ApexPages.StandardController(Work_Order__c);
createPage.setRedirect(true);
return createPage;
}
}
this code is works for search but when m trying to add new button its gives error......
<apex:page StandardController="Work_Order__c" extensions="Search" showheader="true" action="{!redirect}">
<apex:form >
<apex:outputLabel >Enter The Work Order Number ::- </apex:outputLabel>
<apex:inputText value="{!searchText}"/><br/>
<apex:commandButton value="Search" Action="{!Search}"/><br/>
<apex:commandButton value="New" Action="{!createNew}" rendered="{!showNew}"/>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputText >Message: {!msg}</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
controller............
public class Search
{
public String SearchText{get;set;}
public Work_Order__c wo{get;set;}
public string msg{get;set;}
public boolean showNew { get; set;}
public Search(ApexPages.StandardController controller)
{
showNew = false;
}
public void search()
{
List<Work_Order__c> wolist=[select id,name from Work_Order__c];
for(Work_Order__c w:wolist)
{
if(w.name.containsIgnorecase(searchText))
wo=w;
}
if(wo==null)
{
msg='Work Order Number Not Exist u can create New by given link below';
showNew = true;
}
else
{
msg='Work Order Number already Exist' ;
showNew = true;
}
}
public PageReference createRecord() {
PageReference createPage=new ApexPages.StandardController(Work_Order__c);
createPage.setRedirect(true);
return createPage;
}
}
-
- Shubham Sengar
- November 02, 2015
- Like
- 0
- Continue reading or reply
Dashboard detail Send by Email
1) How to send Dashboard to any User in Email to his/her Email id.
2) how to create Dashboard which performe same thing Daly automatically.like leads Detail dashboard update day by day automatically
2) how to create Dashboard which performe same thing Daly automatically.like leads Detail dashboard update day by day automatically
-
- Shubham Sengar
- October 28, 2015
- Like
- 0
- Continue reading or reply
contact Fee detail by trigger
How to write a trigger to calculate all contact fee by particular class wise ...
like we have 5 class then first search how many student in every clsss particularly (salesforce student =?)
then give all fee detail
Fee Paid Details = First Installment + Second Installment or Paid Full Fee
where Fee Paid Details is class object's field and remaning three like First Installment ,Second Installment , Paid Full Fee is Contact object's field..??
contact object connect with lookup with class object
like we have 5 class then first search how many student in every clsss particularly (salesforce student =?)
then give all fee detail
Fee Paid Details = First Installment + Second Installment or Paid Full Fee
where Fee Paid Details is class object's field and remaning three like First Installment ,Second Installment , Paid Full Fee is Contact object's field..??
contact object connect with lookup with class object
-
- Shubham Sengar
- October 28, 2015
- Like
- 0
- Continue reading or reply
Record type link with VF
How to connect vf with record type ..??
like ---- I have 2 record type in work order object ..
first one is -Change revision
2nd is - Revision data
when we select Change revision it goes to vf and when we select 2nd Revision data its goes to standered page .
like ---- I have 2 record type in work order object ..
first one is -Change revision
2nd is - Revision data
when we select Change revision it goes to vf and when we select 2nd Revision data its goes to standered page .
-
- Shubham Sengar
- October 28, 2015
- Like
- 0
- Continue reading or reply
VF question
how to add New Button in VF search page.
like if our data is not found then a NEW Button there with the help of this button we can create new record
my Search page works only m looking for NEW Button
<apex:page StandardController="Work_Order__c" extensions="Search">
<apex:form >
<apex:outputLabel >Enter The Work Order Number ::- </apex:outputLabel>
<apex:inputText value="{!searchText}"/><br/>
<apex:commandButton value="Search" Action="{!Search}"/><br/>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputText >Message: {!msg}</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
public class Search{
public String SearchText{get;set;}
public Work_Order__c wo{get;set;}
public string msg{get;set;}
public Search(ApexPages.StandardController controller)
{
}
public void search()
{
List<Work_Order__c> wolist=[select id,name from Work_Order__c];
for(Work_Order__c w:wolist)
{
if(w.name.containsIgnorecase(searchText))
wo=w;
}
if(wo==null)
{
msg='Work Order Number Not Exist u can create New by given link below';
}
else
{
msg='Work Order Number already Exist' ;
}
}
}
like if our data is not found then a NEW Button there with the help of this button we can create new record
my Search page works only m looking for NEW Button
<apex:page StandardController="Work_Order__c" extensions="Search">
<apex:form >
<apex:outputLabel >Enter The Work Order Number ::- </apex:outputLabel>
<apex:inputText value="{!searchText}"/><br/>
<apex:commandButton value="Search" Action="{!Search}"/><br/>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputText >Message: {!msg}</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
public class Search{
public String SearchText{get;set;}
public Work_Order__c wo{get;set;}
public string msg{get;set;}
public Search(ApexPages.StandardController controller)
{
}
public void search()
{
List<Work_Order__c> wolist=[select id,name from Work_Order__c];
for(Work_Order__c w:wolist)
{
if(w.name.containsIgnorecase(searchText))
wo=w;
}
if(wo==null)
{
msg='Work Order Number Not Exist u can create New by given link below';
}
else
{
msg='Work Order Number already Exist' ;
}
}
}
-
- Shubham Sengar
- October 27, 2015
- Like
- 0
- Continue reading or reply
Visualforce page Problems
When u click on New Button (Account Page) its goes to A VF Page where 3 fiels like Account Name ,Account Number ,Account Phone No
and one Save Button...............................
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Account Details">
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.accountNumber}"/>
<apex:inputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>.........
When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .......................
<apex:page standardController="Account" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="GoToContact" action="{!Contact1}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Account Details">
<apex:outputField value="{!Account.Name}"/>
<apex:outputField value="{!Account.accountNumber}"/>
<apex:outputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
and class code is ..
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
When u click on "Go To Contact" Button it will goes to contact detail page(custome vf page) where Account Name ,Account Number ,Account Phone No will populated in new contact ..
Hear i am facing problem ....
<apex:page standardController="Contact" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Contact Details">
<apex:inputField value="{!Contact.id}"/>
<apex:outputField value="{!contact.Account.Name}"/>
<apex:inputField value="{!Contact.Name}"/>
<apex:inputField value="{!Contact.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
n class code
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
and one Save Button...............................
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Account Details">
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.accountNumber}"/>
<apex:inputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>.........
When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .......................
<apex:page standardController="Account" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="GoToContact" action="{!Contact1}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Account Details">
<apex:outputField value="{!Account.Name}"/>
<apex:outputField value="{!Account.accountNumber}"/>
<apex:outputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
and class code is ..
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
When u click on "Go To Contact" Button it will goes to contact detail page(custome vf page) where Account Name ,Account Number ,Account Phone No will populated in new contact ..
Hear i am facing problem ....
<apex:page standardController="Contact" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Contact Details">
<apex:inputField value="{!Contact.id}"/>
<apex:outputField value="{!contact.Account.Name}"/>
<apex:inputField value="{!Contact.Name}"/>
<apex:inputField value="{!Contact.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
n class code
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
-
- Shubham Sengar
- September 25, 2015
- Like
- 0
- Continue reading or reply
Visualforce page Problem
Step 1:- When u click on New Button (Account Page) its goes to A VF Page where 3 fiels like Account Name ,Account Number ,Account Phone No
and one Save Button
Step 2:- When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .
Step 3:- When u click on "Go To Contact" Button it will goes to contact detail page where Account Name ,Account Number ,Account Phone No will populated which we gave in Step 1.
in short New Account And Contact page Created in these 3 Step...
and one Save Button
Step 2:- When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .
Step 3:- When u click on "Go To Contact" Button it will goes to contact detail page where Account Name ,Account Number ,Account Phone No will populated which we gave in Step 1.
in short New Account And Contact page Created in these 3 Step...
-
- Shubham Sengar
- September 20, 2015
- Like
- 0
- Continue reading or reply
SOQL problem
Create a 'Sales Team' as a related object to 'Lead'...So lead will be parent and Sales Team will be child.
Sales Team Fields :
Team Member (Looup to user)
Role-(Lookup to role)
* Write a SOQL Query to get the Team member and his role for particular lead owner
* Using data loader extract the same data what you are getting in SOQL Query.
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
Sales Team Fields :
Team Member (Looup to user)
Role-(Lookup to role)
* Write a SOQL Query to get the Team member and his role for particular lead owner
* Using data loader extract the same data what you are getting in SOQL Query.
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
-
- Shubham Sengar
- September 18, 2015
- Like
- 0
- Continue reading or reply
sum of fee by using trigger
How to write a trigger to sum like
Fee Paid Details = First Installment + Second Installment or Paid Full Fee
where Fee Paid Details is class object's field and remaning three like First Installment ,Second Installment , Paid Full Fee is Contact object's field..??
Fee Paid Details = First Installment + Second Installment or Paid Full Fee
where Fee Paid Details is class object's field and remaning three like First Installment ,Second Installment , Paid Full Fee is Contact object's field..??
-
- Shubham Sengar
- September 10, 2015
- Like
- 0
- Continue reading or reply
dataloader error
when i am going to update leads status by using data loader then its gives erroe that is
Please log an activity for this lead in order to select the "Actively Working" status.
i never seen this type erroe ....any idea when these type errors coming??
-
- Shubham Sengar
- August 30, 2015
- Like
- 0
- Continue reading or reply
QOQL problem 11
Retrieve the first 10 rows of a account??
Retrieve the next 10 rows, 11 through 21 ??
-
- Shubham Sengar
- August 17, 2015
- Like
- 1
- Continue reading or reply
SOQL Problem 10
Show all the opportunity IDs for all contacts whose Leadsource is not Web???
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL Problem 8
Show all the account IDs that have open opportunities if the last name of the contact associated with
the account is like the last name “Apple”:??
the account is like the last name “Apple”:??
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL Problem 7
Show all the Account records in alphabetical order by first name, sorted in descending order, with
accounts that have null names appearing last:??
accounts that have null names appearing last:??
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL Problem 6
Get all accounts that do not have any open opportunities by soql code??
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL problem 5
Get all contacts for accounts that have an opportunity with a particular record type.??
By SOQL
By SOQL
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL problem 4
Give me a count of the contacts for an Account Like 123??
SELECT Name,Id (SELECT count() FROM Contact) FROM Account WHERE Name like '%123%'
but its gives error..
SELECT Name,Id (SELECT count() FROM Contact) FROM Account WHERE Name like '%123%'
but its gives error..
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL problem 3
Give me a list of all the case with status ‘new’ with their contact name and account name.??
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
SOQL problem 2
Give me a list of all the opportunities with stage name ‘Prospecting’ with their account name??
select name(select id from Account) from Opportunity where StageName='Prospecting'
but it gives error ..
select name,(select name from Account__r) from Opportunity where
^
ERROR at Row:1:Column:31
Didn't understand relationship 'Account__r' 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.
select name(select id from Account) from Opportunity where StageName='Prospecting'
but it gives error ..
select name,(select name from Account__r) from Opportunity where
^
ERROR at Row:1:Column:31
Didn't understand relationship 'Account__r' 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.
-
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
QOQL problem 11
Retrieve the first 10 rows of a account??
Retrieve the next 10 rows, 11 through 21 ??
-
- Shubham Sengar
- August 17, 2015
- Like
- 1
- Continue reading or reply
Record type link with VF
How to connect vf with record type ..??
like ---- I have 2 record type in work order object ..
first one is -Change revision
2nd is - Revision data
when we select Change revision it goes to vf and when we select 2nd Revision data its goes to standered page .
like ---- I have 2 record type in work order object ..
first one is -Change revision
2nd is - Revision data
when we select Change revision it goes to vf and when we select 2nd Revision data its goes to standered page .
- Shubham Sengar
- October 28, 2015
- Like
- 0
- Continue reading or reply
VF question
how to add New Button in VF search page.
like if our data is not found then a NEW Button there with the help of this button we can create new record
my Search page works only m looking for NEW Button
<apex:page StandardController="Work_Order__c" extensions="Search">
<apex:form >
<apex:outputLabel >Enter The Work Order Number ::- </apex:outputLabel>
<apex:inputText value="{!searchText}"/><br/>
<apex:commandButton value="Search" Action="{!Search}"/><br/>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputText >Message: {!msg}</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
public class Search{
public String SearchText{get;set;}
public Work_Order__c wo{get;set;}
public string msg{get;set;}
public Search(ApexPages.StandardController controller)
{
}
public void search()
{
List<Work_Order__c> wolist=[select id,name from Work_Order__c];
for(Work_Order__c w:wolist)
{
if(w.name.containsIgnorecase(searchText))
wo=w;
}
if(wo==null)
{
msg='Work Order Number Not Exist u can create New by given link below';
}
else
{
msg='Work Order Number already Exist' ;
}
}
}
like if our data is not found then a NEW Button there with the help of this button we can create new record
my Search page works only m looking for NEW Button
<apex:page StandardController="Work_Order__c" extensions="Search">
<apex:form >
<apex:outputLabel >Enter The Work Order Number ::- </apex:outputLabel>
<apex:inputText value="{!searchText}"/><br/>
<apex:commandButton value="Search" Action="{!Search}"/><br/>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputText >Message: {!msg}</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
public class Search{
public String SearchText{get;set;}
public Work_Order__c wo{get;set;}
public string msg{get;set;}
public Search(ApexPages.StandardController controller)
{
}
public void search()
{
List<Work_Order__c> wolist=[select id,name from Work_Order__c];
for(Work_Order__c w:wolist)
{
if(w.name.containsIgnorecase(searchText))
wo=w;
}
if(wo==null)
{
msg='Work Order Number Not Exist u can create New by given link below';
}
else
{
msg='Work Order Number already Exist' ;
}
}
}
- Shubham Sengar
- October 27, 2015
- Like
- 0
- Continue reading or reply
Visualforce page Problems
When u click on New Button (Account Page) its goes to A VF Page where 3 fiels like Account Name ,Account Number ,Account Phone No
and one Save Button...............................
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Account Details">
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.accountNumber}"/>
<apex:inputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>.........
When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .......................
<apex:page standardController="Account" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="GoToContact" action="{!Contact1}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Account Details">
<apex:outputField value="{!Account.Name}"/>
<apex:outputField value="{!Account.accountNumber}"/>
<apex:outputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
and class code is ..
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
When u click on "Go To Contact" Button it will goes to contact detail page(custome vf page) where Account Name ,Account Number ,Account Phone No will populated in new contact ..
Hear i am facing problem ....
<apex:page standardController="Contact" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Contact Details">
<apex:inputField value="{!Contact.id}"/>
<apex:outputField value="{!contact.Account.Name}"/>
<apex:inputField value="{!Contact.Name}"/>
<apex:inputField value="{!Contact.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
n class code
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
and one Save Button...............................
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Account Details">
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.accountNumber}"/>
<apex:inputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>.........
When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .......................
<apex:page standardController="Account" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="GoToContact" action="{!Contact1}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Account Details">
<apex:outputField value="{!Account.Name}"/>
<apex:outputField value="{!Account.accountNumber}"/>
<apex:outputField value="{!account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
and class code is ..
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
When u click on "Go To Contact" Button it will goes to contact detail page(custome vf page) where Account Name ,Account Number ,Account Phone No will populated in new contact ..
Hear i am facing problem ....
<apex:page standardController="Contact" extensions="Contact">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Contact Details">
<apex:inputField value="{!Contact.id}"/>
<apex:outputField value="{!contact.Account.Name}"/>
<apex:inputField value="{!Contact.Name}"/>
<apex:inputField value="{!Contact.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
n class code
public with sharing class Contact {
public Account a{get; set;}
public Contact(ApexPages.StandardController controller) {
}
string id = Apexpages.currentpage().getParameters().get('id');
public pagereference contact1()
{
PageReference requestPage = new pagereference('https://ap2.salesforce.com/003/o'+a);
return page.contactpage.setredirect(true);
}
}
- Shubham Sengar
- September 25, 2015
- Like
- 0
- Continue reading or reply
Visualforce page Problem
Step 1:- When u click on New Button (Account Page) its goes to A VF Page where 3 fiels like Account Name ,Account Number ,Account Phone No
and one Save Button
Step 2:- When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .
Step 3:- When u click on "Go To Contact" Button it will goes to contact detail page where Account Name ,Account Number ,Account Phone No will populated which we gave in Step 1.
in short New Account And Contact page Created in these 3 Step...
and one Save Button
Step 2:- When u click on Save Button (VF Page) it will goes to another new VF page Where Account Name Auto Populated With a ("Go To Contact") Button .
Step 3:- When u click on "Go To Contact" Button it will goes to contact detail page where Account Name ,Account Number ,Account Phone No will populated which we gave in Step 1.
in short New Account And Contact page Created in these 3 Step...
- Shubham Sengar
- September 20, 2015
- Like
- 0
- Continue reading or reply
SOQL problem
Create a 'Sales Team' as a related object to 'Lead'...So lead will be parent and Sales Team will be child.
Sales Team Fields :
Team Member (Looup to user)
Role-(Lookup to role)
* Write a SOQL Query to get the Team member and his role for particular lead owner
* Using data loader extract the same data what you are getting in SOQL Query.
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
Sales Team Fields :
Team Member (Looup to user)
Role-(Lookup to role)
* Write a SOQL Query to get the Team member and his role for particular lead owner
* Using data loader extract the same data what you are getting in SOQL Query.
*Write a SOQL query to 'Team member'= XYZ and the lead id='abc'
- Shubham Sengar
- September 18, 2015
- Like
- 0
- Continue reading or reply
sum of fee by using trigger
How to write a trigger to sum like
Fee Paid Details = First Installment + Second Installment or Paid Full Fee
where Fee Paid Details is class object's field and remaning three like First Installment ,Second Installment , Paid Full Fee is Contact object's field..??
Fee Paid Details = First Installment + Second Installment or Paid Full Fee
where Fee Paid Details is class object's field and remaning three like First Installment ,Second Installment , Paid Full Fee is Contact object's field..??
- Shubham Sengar
- September 10, 2015
- Like
- 0
- Continue reading or reply
SOQL Problem 1
Give me all the duplicate accounts for an Account 123??
Select count(id)
from Account
Where Name = 123
Group by Name
Having Count(id) > 1
its give error..
- Shubham Sengar
- August 16, 2015
- Like
- 0
- Continue reading or reply
trigger problem 7
before we insert a new record in the customer object calculate the tax field value based on salary field value and then insert??
How i reach the right code ..??
How i reach the right code ..??
- Shubham Sengar
- August 13, 2015
- Like
- 0
- Continue reading or reply
trigger problem 5
write a trigger will prevent user from creating a lead that already existing as a contact .?
hint:: we will use leads/contacts email address to detact duplicates
hint:: we will use leads/contacts email address to detact duplicates
- Shubham Sengar
- August 12, 2015
- Like
- 0
- Continue reading or reply
trigger problem 4
To update the owner of a case based on the values selected with in a picklist and papulate the owner field with the creaded by the field data when we have seleted any field name = status..??
- Shubham Sengar
- August 12, 2015
- Like
- 0
- Continue reading or reply
Unable to enable Lightning Components in developer edition...
Hi Everyone..
I have tried enabling Lightning Component by referring to lightning Quick Start guide at https://developer.salesforce.com/resource/pdfs/Lightning_QuickStart.pdf
I am stucked at step 3. I am unable to see Lightning Components under Develope. Can someone help me out if I am missing anything here.
Thanks You!!
I have tried enabling Lightning Component by referring to lightning Quick Start guide at https://developer.salesforce.com/resource/pdfs/Lightning_QuickStart.pdf
I am stucked at step 3. I am unable to see Lightning Components under Develope. Can someone help me out if I am missing anything here.
Thanks You!!
- Ganesh Ekhande
- October 16, 2014
- Like
- 0
- Continue reading or reply