-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
14Questions
-
7Replies
Error in Static Resource
I am working on visualforce pages,In that I have written some style class,So what I have done is I put all the style classes in a single file .
<apex:stylesheet value="{!URLFOR($Resource.Styles, 'new1.css')}" />
This was not working .please help me out
-
- aditya3
- October 08, 2015
- Like
- 0
- Continue reading or reply
Show/Hide the section in the vf page
I am working on vf pages in that I am having the task section as shown in the below,I want to show the sections of Items and attachments when clicking the arrow adjust to the attachments .How can I achieve this
please follow the screenshot
Thanks in advance
-
- aditya3
- October 05, 2015
- Like
- 0
- Continue reading or reply
Multi-Level picklist
I am having a 3 tier dependent picklist
If the user selects country India then Indian states will displays depending on the state city will display //similarly for all
Here I have tried the code like this
<apex:page controller="sample">
<apex:form >
<style>
.city
{
margin-left: 124px;
}
</style>
<apex:outputLabel value="country"/>
<apex:selectList size="1" value="{!country}">
<apex:selectOptions value="{!countries}"/>
<apex:actionSupport event="onchange" reRender="a"/>
</apex:selectList>
<apex:outputLabel value="Stated"/>
<apex:selectList size="1" value="{!state}">
<apex:selectOptions value="{!states}"/>
</apex:selectList>
<apex:outputLabel value="City" styleClass="city"/>
<apex:selectList size="1" value="{!city}" id="a">
<apex:selectOptions value="{!cities}"/>
</apex:selectList>
</apex:form>
</apex:page>
--------controller class -----
public class sample
{
public String textValue { get; set; }
public String getInputValue() {
return null;
}
public string country {get;set;}
public String state {get;set;}
public String city {get;set;}
public List <SelectOption> getcountries()
{
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('None','--- None ---'));
options.add(new SelectOption('IND','INDIA'));
options.add(new SelectOption('PAK','PAKISTHAN'));
options.add(new SelectOption('AUS','AUSTRALIA'));
options.add(new SelectOption('NZ','NEWZELAND'));
return options;
}
public List<SelectOption> getStates()
{
List<SelectOption> options = new List<SelectOption>();
if(country == 'IND')
{
options.add(new SelectOption('None','--- None ---'));
options.add(new SelectOption('TN','Tamil Nadu'));
options.add(new SelectOption('KL','Kerala'));
options.add(new SelectOption('AP','Andhra'));
options.add(new SelectOption('TL','Telangana'));
}
return options;
}
else if(country == 'PAK')
{
options.add(new SelectOption('ISB','ISLAMABAD'));
options.add(new SelectOption('LAH','LAHORE'));
}
else if(country == 'AUS')
{
options.add(new SelectOption('SYD','SYDNEY'));
options.add(new SelectOption('MEL','MELBOURNE'));
}
else if(country == 'NZ')
{
options.add(new SelectOption('AUC','AUCKLAND'));
options.add(new SelectOption('WL','WELLINGTON'));
}
else
{
return options;
}
}
public List<SelectOption> getCities()
{
List<SelectOption> options = new List<SelectOption>();
if(country == 'IND')
{
if(state == 'TN')
{
options.add(new SelectOption('CHE','Chennai'));
options.add(new SelectOption('CBE','Coimbatore'));
options.add(new SelectOption('mdh','madurai'));
options.add(new SelectOption('kk','Kumbakonam'));
}
else if(state == 'KL')
{
options.add(new SelectOption('COA','Coachin'));
options.add(new SelectOption('MVL','Mavelikara'));
}
else if(state == 'AP')
{
options.add(new SelectOption('vij','vijayawada'));
options.add(new SelectOption('gnt','Guntur'));
options.add(new SelectOption('chr','cheerala'));
options.add(new SelectOption('ong','ongole'));
}
else if(state == 'TL')
{
options.add(new SelectOption('Hyd','Hyderabad'));
options.add(new SelectOption('wl','warangal'));
options.add(new SelectOption('kr','karimnagar'));
}
else
{
return options;
}
if(country == 'PAK')
{
if (state == 'ISB')
{
options.add(new SelectOption('kar','Karachi'));
options.add(new SelectOption('raw','Rawalpindi'));
}
else if (state == 'LAH')
{
options.add(new SelectOption('FAR','FARIDABAD'));
options.add(new SelectOption('SEH','SEHZAD'));
}
else
{
return options;
}
if(country == 'NZ')
{
if (state == 'AUC')
{
options.add(new SelectOption('gup','guptil'));
options.add(new SelectOption('ross','rosstaylor'));
}
else if (state == 'WL')
{
options.add(new SelectOption('mec','meculum'));
options.add(new SelectOption('shan','Shanebond'));
}
else
{
return options;
}
if(country == 'AUS')
{
if (state == 'SYD')
{
options.add(new SelectOption('mark','markwaugh'));
options.add(new SelectOption('stev','stevwaugh'));
}
else if (state == 'MEL')
{
options.add(new SelectOption('ricky','rickyponting'));
options.add(new SelectOption('smith','smithstone'));
}
else
{
options.add(new SelectOption('None','--- None ---'));
}
return options;
}
}
}
}
}
}
Please do the needful
-
- aditya3
- June 08, 2015
- Like
- 0
- Continue reading or reply
visualforce charting
How many objects can we include in visualforce charting ?
say for example I have one field in account object and another field in opportunity object ,those two objects we dont have any relation
but is it possible to take the values and do the chart by using (pie chart)(<apex:chart>) ?
Please let me know
-
- aditya3
- June 04, 2015
- Like
- 0
- Continue reading or reply
Dynamic Query with displaying of records
I am working with pagination task,Here I am facing the problem is create a textbox [inside the text box if I enter 5 means it displays 5 records]
Below is my code ,How can I achieve this ?please help me ?
<apex:page standardController="Account" recordSetVar="Accounts" sidebar="false" extensions="cont" >
<!--<apex:sectionHeader title="My Accounts" subtitle="Account Management"/> -->
<apex:form >
<apex:pageBlock >
<apex:pageMessages id="error" />
<apex:panelGrid columns="7" id="buttons">
<apex:commandButton action="{!Save}" value="Save"/>
<apex:commandButton action="{!Cancel}" value="Cancel"/>
<!--<apex:inputHidden /> -->
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasprevious}" action="{!First}" value="First"/>
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasprevious}" action="{!Previous}" value="Previous"/>
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasnext}" action="{!Next}" value="Next"/>
<apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasnext}" action="{!Last}" value="Last"/>
</apex:panelGrid>
<apex:pageBlockSection id="blocktable" >
<apex:pageBlockTable value="{!Accounts}" var="t">
<apex:column headerValue="Account" value="{!t.Name}" />
<apex:column headerValue="Phone" value="{!t.Phone}" />
<apex:column headerValue="Industry" value="{!t.Industry}" />
<apex:column headerValue="Rating" value="{!t.Rating}" />
<!-- <apex:column headerValue="Priority">
<apex:outputField value="{!t.Priority__c}" />
</apex:column> --->
<apex:inlineEditSupport event="onClick"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
-
- aditya3
- May 21, 2015
- Like
- 0
- Continue reading or reply
Learning Apex Classes and Triggers
(System.Trigger.isInsert ||
(lead.Email != System.Trigger.oldMap.
get(lead.Id).Email)))
How can I understand this ?here get() is the method in the oldMap or how many methods are there in oldMap? and where to use get ()put()set()??orelse we can use where ever we want ??
Please help me ..I am Learning Apex classes and Triggers
-
- aditya3
- May 19, 2015
- Like
- 0
- Continue reading or reply
Hiding the "Submit For Approval Button " in Approval History(Related List in Quotes)
I want to HIde the button Submit For Aprroval Button in Approval History which is related list of Quotes ,Please Check the Screen Shot
-
- aditya3
- May 16, 2015
- Like
- 0
- Continue reading or reply
How to use onmouseover attribute in <apex:tabPanel>
Here Is a sample code,I need to work onmouseover tab,while I am moving the mouse the tab should change .
<apex:page id="thePage">
<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel" onmouseover="">
<apex:tab label="One" name="name1" id="tabOne">content for tab one</apex:tab>
<apex:tab label="Two" name="name2" id="tabTwo">content for tab two</apex:tab>
</apex:tabPanel>
</apex:page>
-
- aditya3
- May 13, 2015
- Like
- 0
- Continue reading or reply
Trigger Scenario
Salesforce -> Cases -> Emails (stored as activity history). Write a trigger to copy these emails as "Comments", every time an email is received.
Just like SFDC -> Cases -> Emails, SFDC -> Cases -> Comments.
please guide me in this scenario ,I want to copy all the emails to comments
-
- aditya3
- May 06, 2015
- Like
- 0
- Continue reading or reply
How to Disable a standard Button in salesforce ?
Any help would be greatly appriciated
-
- aditya3
- May 02, 2015
- Like
- 1
- Continue reading or reply
<apex:form> error getting
This is the error I am getting after writing 233 line of code ,I am not getting please help me ,As I checked <apex:form>also open tag and closed tag
-
- aditya3
- April 11, 2015
- Like
- 0
- Continue reading or reply
Soql Query
I am trying to query all the records in Account and Contact object ,As I have tried Like this
public class hong12
{
public List<account> acclist{get;set;}
public List<contact> contlist{get;set;}
public hong12()
{
acclist=[select id,Name,phone,Industry,Type,NumberOfEmployees from Account];
contlist=[select id,Name,Email,phone from Contact];
}
}But I am getting Error Like this
Error: Compile Error: The property List<Contact> contlist is referenced by Visualforce Page (newhomepg) in salesforce.com. Remove the usage and try again. at line 4 column 22
-
- aditya3
- April 09, 2015
- Like
- 0
- Continue reading or reply
Regarding OutputLink
I am trying to put outlink for the name of the Account as Displayed in a List ,THe code is as follows ,Please help me how to modify that how to add outputlink
<apex:dataTable value="{!acclist}" var="ac" cellpadding="4" border="2">
<apex:column headerValue="Name" value="{!ac.name}"/>
<apex:column headerValue="Phone" value="{!ac.Phone}"/>
<apex:column headerValue="Industry" value="{!ac.Industry}"/>
<apex:column headerValue="Type" value="{!ac.Type}"/>
<apex:column headerValue="Employees grc" value="{!ac.NumberOfEmployees}"/>
</apex:dataTable>
-
- aditya3
- April 08, 2015
- Like
- 0
- Continue reading or reply
Displaying a List of Records
I have the list of records in account object ,I want to display all the records in drop-down menu ,when I Click the particular record
in drop-down menu say for Example Burlington Textiles Corp of America, It will display the detailed page of the account with related contact and opportunity ,Any Help would be greatly Appriciated //
-
- aditya3
- April 03, 2015
- Like
- 0
- Continue reading or reply
How to Disable a standard Button in salesforce ?
Any help would be greatly appriciated
-
- aditya3
- May 02, 2015
- Like
- 1
- Continue reading or reply
Error in Static Resource
I am working on visualforce pages,In that I have written some style class,So what I have done is I put all the style classes in a single file .
<apex:stylesheet value="{!URLFOR($Resource.Styles, 'new1.css')}" />
This was not working .please help me out
- aditya3
- October 08, 2015
- Like
- 0
- Continue reading or reply
visualforce charting
How many objects can we include in visualforce charting ?
say for example I have one field in account object and another field in opportunity object ,those two objects we dont have any relation
but is it possible to take the values and do the chart by using (pie chart)(<apex:chart>) ?
Please let me know
- aditya3
- June 04, 2015
- Like
- 0
- Continue reading or reply
Soql Query
I am trying to query all the records in Account and Contact object ,As I have tried Like this
public class hong12
{
public List<account> acclist{get;set;}
public List<contact> contlist{get;set;}
public hong12()
{
acclist=[select id,Name,phone,Industry,Type,NumberOfEmployees from Account];
contlist=[select id,Name,Email,phone from Contact];
}
}But I am getting Error Like this
Error: Compile Error: The property List<Contact> contlist is referenced by Visualforce Page (newhomepg) in salesforce.com. Remove the usage and try again. at line 4 column 22
- aditya3
- April 09, 2015
- Like
- 0
- Continue reading or reply
Regarding OutputLink
I am trying to put outlink for the name of the Account as Displayed in a List ,THe code is as follows ,Please help me how to modify that how to add outputlink
<apex:dataTable value="{!acclist}" var="ac" cellpadding="4" border="2">
<apex:column headerValue="Name" value="{!ac.name}"/>
<apex:column headerValue="Phone" value="{!ac.Phone}"/>
<apex:column headerValue="Industry" value="{!ac.Industry}"/>
<apex:column headerValue="Type" value="{!ac.Type}"/>
<apex:column headerValue="Employees grc" value="{!ac.NumberOfEmployees}"/>
</apex:dataTable>
- aditya3
- April 08, 2015
- Like
- 0
- Continue reading or reply
Displaying a List of Records
I have the list of records in account object ,I want to display all the records in drop-down menu ,when I Click the particular record
in drop-down menu say for Example Burlington Textiles Corp of America, It will display the detailed page of the account with related contact and opportunity ,Any Help would be greatly Appriciated //
- aditya3
- April 03, 2015
- Like
- 0
- Continue reading or reply
How to remove custom fields using Metadata API (Bulk delete custom fields)
Hello,
I want to delete 500+ custom fields. Is there any solution to mass remove custom fields? I have tried with metadata Api using below code. But it gives me below error.
Object with id:04s900000037qo4AAA is InProgress
Error status code: INVALID_CROSS_REFERENCE_KEY
Error message: In field: members - no CustomField named Custom_Field__c found
Object with id:04s900000037qo4AAA is Error
Below is the code:
public void deleteCustomField(String fullname) throws Exception
{
CustomField customField = new CustomField();
customField.setFullName(fullname);
UpdateMetadata updateMetadata = new UpdateMetadata();
updateMetadata.setMetadata(customField);
updateMetadata.setCurrentName(fullname);
AsyncResult[] asyncResults = metadataConnection.delete(new Metadata[] {customField});
long waitTimeMilliSecs = ONE_SECOND;
do
{
printAsyncResultStatus(asyncResults);
waitTimeMilliSecs *= 2;
Thread.sleep(waitTimeMilliSecs);
asyncResults = metadataConnection.checkStatus(new String[]{asyncResults[0].getId()});
} while (!asyncResults[0].isDone());
printAsyncResultStatus(asyncResults);
}
private void printAsyncResultStatus(AsyncResult[] asyncResults) throws Exception {
if (asyncResults == null || asyncResults.length == 0 || asyncResults[0] == null) {
throw new Exception("The object status cannot be retrieved");
}
AsyncResult asyncResult = asyncResults[0]; //we are creating only 1 metadata object
if (asyncResult.getStatusCode() != null) {
System.out.println("Error status code: " +
asyncResult.getStatusCode());
System.out.println("Error message: " + asyncResult.getMessage());
}
System.out.println("Object with id:" + asyncResult.getId() + " is " +
asyncResult.getState());
}
Is there any other solution (any app) to removing custom fields?
Thanks in advance,
Dhaval Panchal
- Dhaval Panchal
- August 19, 2013
- Like
- 1
- Continue reading or reply