• aditya3
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Mr

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 7
    Replies
Hi
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
Hi all,

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

 
Hi all,
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
 
Hi All,
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>
Hi ,
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 //

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