• Anupama@28
  • NEWBIE
  • 55 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 40
    Questions
  • 22
    Replies
Hi,

We have a lighting component opens through quick action popup. After finishing the task we are refreshing the record detail page, closing the popup and showing the toast message but the toast message is firing twice. how to avoid this ? We just need one notification message.

Here is my function from helper js.
updateRS : function(component,event) {
        event.preventDefault();
        var currentOpptyId = component.get("v.recordId");
        console.log("currentOpptyId : " +currentOpptyId);;
        var pushmonth = component.get("v.PushMonth");
        console.log("pushmonth : " +pushmonth);
        var action = component.get("c.pushrs");
        action.setParams({
            "currentOpptyId":currentOpptyId,
            "pushmonth" : pushmonth
        });
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS"){
                var toastEvent = $A.get("e.force:showToast");
                $A.get('e.force:refreshView').fire();
                
                toastEvent.setParams({
                    "title": "Success!",
                    "message": "Success!",
                    type: 'success',
                   // mode: 'pester'
                });
                toastEvent.fire();
                $A.get('e.force:closeQuickAction').fire();
            }
            else{
                alert('Pushing Revenue Schedule Period is not successful');
            }
        });
        $A.enqueueAction(action); 
    },

closeactionhelper : function(component,event) {
        setTimeout(function(){
            	var action = $A.get("e.force:closeQuickAction").fire(); 
		}, 1000);
}



Thanks,
Anupama
 
Hi,

I have a lighting component to delete the related list (child objects) records. after deleting the child records the parent view page is not getting refreshed i.e. the related list record count is not setting to 0 after deleting all of them. When I manually refresh the tab the related list's record count is updating. please help me in fixing this issue.
or how to delay the refresh ?

below is my code...
var action = component.get("c.clearRS");   //calling server-side method
        action.setParams({
        	"lstSelectedPL":selectedRecords
    	});
        action.setCallback(this, function(response){
            var state = response.getState();
            if(state === 'SUCCESS'){
                helper.doInitHelper(component, event);
                $A.get('e.force:refreshView').fire();
            }
            ...
            ...
            ...


 
Hi,

I have a lightning compnent exactly same as given in below link... 
http://sfdcmonkey.com/2018/10/22/data-table-pagination-checkbox-lightning/.

<aura:if isTrue="{!v.bNoRecordsFound}">
       <div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_info" role="alert">
            <span class="slds-assistive-text">Error</span>
            <h2> ERROR MESSAGE </h2>
        </div>
        <aura:set attribute="else">
         --------------
             <table>
                   <!---- TABLE WITH DATA --->
             </table>
         -----------------
            </aura:set>    
     </aura:if>

Here, when the lightning component is loaded, even if there are no records to display in table of else section... still a blank table is displayed for a while and goes off... and later error message from if section is shown.
how to avoid this ?
We strictly want to show error message immediately if the given condition is true else display the else section(table).

Thanks,
Anupama


    

 
Hello,

We came across a weird issue with lead conversion in one of our sandbox.
When we click on 'Covert' button on lead record, no action is taking place, all our team is facing this issue. BTW the sandbox org is refreshed recently and lead conversion is happening in all other related sandboxes and production. 
In the same sandbox, lead converstion is not working in classic mode but working properly if we swithc to lightning .
Please help us in knowing what might be the issue.

User-added image

Thanks,
Anupama
We have a requirement to send email notification before 'X' min the milestone gets violated.
How to get the milestoneId or milestone name, and timeRemaining of that particular Casemilestone in VF email template that is going to violate.

e.g. A case has 3 milestones 'First response', 'Return to service' and 'Resolution'. I need to build a common email template, if 'First response' is going to violate in 'X' min then our email body should have the name and TimeRemaining of 'first response' milestone and same for other 2 respectively.

here is my sample code I have tried with

VF email template
---------------------------------------------------------------------
<messaging:emailTemplate subject="SLA violation alert : Case# {!relatedTo.caseNumber}" recipientType="User" relatedToType="Case">
    <messaging:htmlEmailBody >
        <html>
            <body>

               <!--------- HOW TO GET THE BELOW VALUE ? ------------------------>
                mileston Name : {!relatedTo.CaseMileStone.Name}          
                Time remaining : {!relatedTo.CaseMileStone.timeRemaining}  
                <!------------------------------------------------------------------------------------->
                                                                                   
            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>


VF custom component
--------------------------------------------------------------------


 
Hi,

We want to delete the expired certificates from 'Certificate and Key Management', but I am not able to delete them as its saying they are used in domains. How do I them.

Thanks,
Anupama
 
Hi,
We have synced salesforce and pardot.Throgh apex callout we are sending the contact information to pardot and pardot is not accepting email address with special charactes like abc+xyz@gmail.com which salesforce does. What is the solution for this?

Thanks in advance
Anupama
 
Hi,
We have set an approval process as below
Initial Submission Actions
Send email notification where Recepient is 'A' Additional emails include 'B' email address
Approval Steps
- Step1

Submit to 3 approvers 'P','Q','R'
-Step2
Submit to 1 approer 'X'

When an record is submitted for approval, initial submission action happens the emails are captured in Compliance BCC emailbox, but the email notifications sent to Approvers 'P','Q','R','X' are not captured in Compliance BCC emailbox, what would be the reason?

Thanks in advance,
Anupama
 
Hi,
We have created a Library in salesorce with some content docuemnts/pdf files under it. 
Our customers and partners wants the to view the content documents in the portal, How to create direct link to view pdf documents.
If I give the contentId in the link it is showing the content in preview mode as salesforce classic view which is not our requirement.
Any help is appreciated.

We have tried the below
-------------------------------------------------
> Uploaded docuements under static resource but disadvantage of static resurce is we cannot have files more than 5MB
> Created as Articles attachment but the articles are showing in KB search result , and we want to hide these files from selected users 

Thanks,
Anupama
Hi,
We have a requirement to count the number of active entitlements under an account.
An entitlement is considered as acitve if "Status = Active AND  EndDate >= Today() and Support level (Text formula field) = 'GOLD or SILVER or PLATINUM' "

we have tried with the below ...
1: Created a rollup summary field on 'Account' to count the active entitlements which meet above criteria , but the problem here is we cannot filter the entitlements using the field status and support level since formula using product object

2:  > Created a custom checkbox field 'isActiveEntitlement' on entitlement object so that we can create a rollup summary field on account to count entitlements with isActiveEntitlement = true
> Created a trigger to set if entitlement is active or not. below is Sample code of trigger

if(Status = Active && EndDate >= Today() AND (Support level = GOLD / SILVER / PLATINUM))
{
      isActiveEntitlement = True;
}
else
{
     isActiveEntitlement = False;
}
Update Entitlement records;

The problem here is if I edit and change the endDate of entitlement manually, the status becomes expired and the trigger is firing and everything is working good but if the date is expired automatically then state is setting to expired but trigger is not firing, isActiveEntitlement is not setting to false hence count is not getting updated on account

3: Created a process builder with same logic as above trigger , this also works good if the entitlement is edited manually and not for automated / backend process.
Please help me to fix the issue or suggest any other ways to count active entitlements.

Thanks,
Anupama




 
We have set up a process builder flow as follows
> Created a checkbox field 'isActive' on 'Entitlement' Object
> Created a process builder flow and updating the field 'isActive' i.e.  'isActive' is checked or unchecked based on some conditions
> When I edit the record manually to meet the criteria process builder flow is working properly
> But for automated processes which happens in the backend and meet the criteria , the 'isActive' field is not gettign unchecked.
Please help me to find out what would be the reason and why it is not woking for automated process.

Thanks,
Anupama
Hi,
I have set an approval process on quote.
Manual approval and rejection is working fine but approve/reject through email is not working.
below configurations are set up in our org :

1: Under Setup > Workflow and Approval process > Process Automation Settings > enabled email approval response
2: Created an Organization-Wide Email Address and using that as 'from address' in initial submission email alert action
3: Not using gmail addresses anywhere
4: I am replying to the same email for approval or rejection
5: Using the proper words like 'approve' / 'reject' / 'approved' .... as first line of the reply email body
6: Testing in sandbox

and still the record is not getting approved/rejected. Please let me know if anything is going wrong.

One more thing I have obsorved is
1: If the email address and from email address is same domain (e.g abc@hcl.com , xyz@hcl.com ) then the email itself is not firing.
2: If  receiver email address and 'From' email address are different atleast the email is sending to approver but record is not getting approved or rejected through email

Thanks in advance


 
Hi,

Is there any way to attach the document to approval step in 'Approval history related list' as shown in the below screen shot 

OR
Attach an document to approval step view page ?

Attach  document to approaval history

Thanks in Advance.

Anupama
 
Hi,
In our org we have set the OWD as follows.
Account = Private
Contact = Controller by parent (i.e Private) .
Hence, only owner of the contact and admin can edit the Contact.
Our requirement is to share the contact to its associated community user, How do we achieve this?

I have tried the below ....
Settings > communities Settings> Sharing sets and shared 'User:Contact.Account = Account:Id'
This will provide access to account user belong to and all the contacts under that account but I want to share only user's associated contact to community user not all the contacts under a particular acc.
any kind of help is appreciated.

Thanks,
Anupama

 
Hi, 

How to get sObject's dependent picklist in lightning component.
I have tried through <force:inputfield> but no luck.

Thanks,
Anupama


 
Hi,

My requierement is to create a site.com page, which displays the current community user's contact details where user can view, edit and save their own contact details.
in community we have option like {!currentUser.Firstname}... but how do i Access the contact information somethind like {!currentUser.Contact.FirstName}, {!currentUser.Contact.Address} etc...

Thanks in advance.

Anupama


 
Hi,

We have a requirement where we need to update the communty user contact details, Is there a way to get the logged in community user information either through lightning component or community builder page or site.com page etc....

I have tried the below

> Created a VF page to get current user information and related contact information
> Created site and given link to the above VF page
> Created a community builder page and given llink to the above site

Here, If i hardcode the contactId in VF page / apex then its working fine but our requirement is to get the current logged in community user info and then fetch his/her contactId.
When i run this as community user the first step i.e. fetching user details itself is failing. 

Please help me to get the requirement done
thanks in advance.

Thanks,
anupama
 
We have a visualforce page where we have used actionsupport with rerendering  attribute for refreshing a output panel which worked good till 6th-May-2016 IST, and then suddenly stopped working i.e. currently rerendering is not working for outputpanel i. I just want help kin knowing is it because the latest release or something wrong in our code.

The code sample is as below
<apex:outputPanel id="Newcase" >                                          
                                        <apex:outputPanel rendered="{!IF(editAccount,true,false)}">
                                            <label>Account: </label>
                                            <apex:selectList size="1" value="{!selectedPartneraccount}" styleClass="form-control" >                             
                                                <apex:selectOptions value="{!partneraccountoptions}"/> 
                                                <apex:actionSupport event="onchange" reRender="Newcase" status="loading" />                                 
                                            </apex:selectList>
                                            
                                            <label>Machine ID: </label>                                                               
                                            <apex:selectList size="1" value="{!selectedMachineId}" styleClass="form-control" id="mId">
                                                <apex:selectOptions value="{!machineIdoptions}" />
                                                <apex:actionSupport event="onchange" reRender="Newcase" status="loading"/>    
                                            </apex:selectList>
                                        </apex:outputPanel>
                                    </apex:outputPanel>


Thanks in advance.


 
Hi All,

We have a requirement where we need to provide the option for rating the articles in VF page and track the ratings as well.
Currently I am using "<knowledge:articleRendererToolBar articleId="{!$CurrentPage.parameters.id}" canVote="true" /> " but here it is displaying the other options as well like 'Edit, Version, Show Properties' Which are not required for us. We only need like and dislike icons also we need to track those records.
User-added image
Please help me removing the edit, Version, Show properties from above tool bar or customization of rating the articles with only promote/Like or demote/Dislike options 

Thanks In advance. :) 
Hi All,

We have a requirement where we need to provide the option for rating the articles in VF page and track the ratings as well.

Currently I am using "<knowledge:articleRendererToolBar articleId="{!$CurrentPage.parameters.id}" canVote="true" /> " but here it is displaying the other options as well like 'Edit, Version, Show Properties' Which are not required for us. We only need like and dislike icons also we need to track those records.
User-added image
Please help me removing the edit, Version, Show properties from above tool bar or customization of rating the articles with only promote or demote options 

Thanks In advance. :) 
As per I know when I am fetching the records from salesforce using bulk API , each batch contains 10,000 records.
Currently I have more than 5,00,000 records in my salesforce enterprise org, but it is creating only one batch  and using that batch it is retrieving all the records . What may be the reason? .

I have done the following steps :
1 : Created a job using sessionId
2 : added a batch to the job and got the following output

output :
----------

<?xml version="1.0" encoding="UTF-8"?><batchInfo
   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
<id>75190000001NuAWAA0</id>     -----> Only one batch is created for more than 5,00,000 records
<jobId>75090000000jZVAAA2</jobId>
<state>Queued</state>
<createdDate>2014-03-10T05:35:49.000Z</createdDate>
<systemModstamp>2014-03-10T05:35:49.000Z</systemModstamp>
<numberRecordsProcessed>0</numberRecordsProcessed>
<numberRecordsFailed>0</numberRecordsFailed>
<totalProcessingTime>0</totalProcessingTime>
<apiActiveProcessingTime>0</apiActiveProcessingTime>
<apexProcessingTime>0</apexProcessingTime>
</batchInfo>

3 : Retrieved the batch result using the query : Select Id from Case , It is returning all the 5,00,000 Ids.

Please help me to get to know the things clearly.
Also let me know if is there any way to set the batch size manually.

Thanks
Anupama
Hi,

I have a lighting component to delete the related list (child objects) records. after deleting the child records the parent view page is not getting refreshed i.e. the related list record count is not setting to 0 after deleting all of them. When I manually refresh the tab the related list's record count is updating. please help me in fixing this issue.
or how to delay the refresh ?

below is my code...
var action = component.get("c.clearRS");   //calling server-side method
        action.setParams({
        	"lstSelectedPL":selectedRecords
    	});
        action.setCallback(this, function(response){
            var state = response.getState();
            if(state === 'SUCCESS'){
                helper.doInitHelper(component, event);
                $A.get('e.force:refreshView').fire();
            }
            ...
            ...
            ...


 
Hi,

I have a lightning compnent exactly same as given in below link... 
http://sfdcmonkey.com/2018/10/22/data-table-pagination-checkbox-lightning/.

<aura:if isTrue="{!v.bNoRecordsFound}">
       <div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_info" role="alert">
            <span class="slds-assistive-text">Error</span>
            <h2> ERROR MESSAGE </h2>
        </div>
        <aura:set attribute="else">
         --------------
             <table>
                   <!---- TABLE WITH DATA --->
             </table>
         -----------------
            </aura:set>    
     </aura:if>

Here, when the lightning component is loaded, even if there are no records to display in table of else section... still a blank table is displayed for a while and goes off... and later error message from if section is shown.
how to avoid this ?
We strictly want to show error message immediately if the given condition is true else display the else section(table).

Thanks,
Anupama


    

 
We have a requirement to send email notification before 'X' min the milestone gets violated.
How to get the milestoneId or milestone name, and timeRemaining of that particular Casemilestone in VF email template that is going to violate.

e.g. A case has 3 milestones 'First response', 'Return to service' and 'Resolution'. I need to build a common email template, if 'First response' is going to violate in 'X' min then our email body should have the name and TimeRemaining of 'first response' milestone and same for other 2 respectively.

here is my sample code I have tried with

VF email template
---------------------------------------------------------------------
<messaging:emailTemplate subject="SLA violation alert : Case# {!relatedTo.caseNumber}" recipientType="User" relatedToType="Case">
    <messaging:htmlEmailBody >
        <html>
            <body>

               <!--------- HOW TO GET THE BELOW VALUE ? ------------------------>
                mileston Name : {!relatedTo.CaseMileStone.Name}          
                Time remaining : {!relatedTo.CaseMileStone.timeRemaining}  
                <!------------------------------------------------------------------------------------->
                                                                                   
            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>


VF custom component
--------------------------------------------------------------------


 
Hi,
We have a requirement to count the number of active entitlements under an account.
An entitlement is considered as acitve if "Status = Active AND  EndDate >= Today() and Support level (Text formula field) = 'GOLD or SILVER or PLATINUM' "

we have tried with the below ...
1: Created a rollup summary field on 'Account' to count the active entitlements which meet above criteria , but the problem here is we cannot filter the entitlements using the field status and support level since formula using product object

2:  > Created a custom checkbox field 'isActiveEntitlement' on entitlement object so that we can create a rollup summary field on account to count entitlements with isActiveEntitlement = true
> Created a trigger to set if entitlement is active or not. below is Sample code of trigger

if(Status = Active && EndDate >= Today() AND (Support level = GOLD / SILVER / PLATINUM))
{
      isActiveEntitlement = True;
}
else
{
     isActiveEntitlement = False;
}
Update Entitlement records;

The problem here is if I edit and change the endDate of entitlement manually, the status becomes expired and the trigger is firing and everything is working good but if the date is expired automatically then state is setting to expired but trigger is not firing, isActiveEntitlement is not setting to false hence count is not getting updated on account

3: Created a process builder with same logic as above trigger , this also works good if the entitlement is edited manually and not for automated / backend process.
Please help me to fix the issue or suggest any other ways to count active entitlements.

Thanks,
Anupama




 
Hi, 

How to get sObject's dependent picklist in lightning component.
I have tried through <force:inputfield> but no luck.

Thanks,
Anupama


 
Hi,

We have a requirement where we need to update the communty user contact details, Is there a way to get the logged in community user information either through lightning component or community builder page or site.com page etc....

I have tried the below

> Created a VF page to get current user information and related contact information
> Created site and given link to the above VF page
> Created a community builder page and given llink to the above site

Here, If i hardcode the contactId in VF page / apex then its working fine but our requirement is to get the current logged in community user info and then fetch his/her contactId.
When i run this as community user the first step i.e. fetching user details itself is failing. 

Please help me to get the requirement done
thanks in advance.

Thanks,
anupama
 
We have a visualforce page where we have used actionsupport with rerendering  attribute for refreshing a output panel which worked good till 6th-May-2016 IST, and then suddenly stopped working i.e. currently rerendering is not working for outputpanel i. I just want help kin knowing is it because the latest release or something wrong in our code.

The code sample is as below
<apex:outputPanel id="Newcase" >                                          
                                        <apex:outputPanel rendered="{!IF(editAccount,true,false)}">
                                            <label>Account: </label>
                                            <apex:selectList size="1" value="{!selectedPartneraccount}" styleClass="form-control" >                             
                                                <apex:selectOptions value="{!partneraccountoptions}"/> 
                                                <apex:actionSupport event="onchange" reRender="Newcase" status="loading" />                                 
                                            </apex:selectList>
                                            
                                            <label>Machine ID: </label>                                                               
                                            <apex:selectList size="1" value="{!selectedMachineId}" styleClass="form-control" id="mId">
                                                <apex:selectOptions value="{!machineIdoptions}" />
                                                <apex:actionSupport event="onchange" reRender="Newcase" status="loading"/>    
                                            </apex:selectList>
                                        </apex:outputPanel>
                                    </apex:outputPanel>


Thanks in advance.


 
Hi,

I  have a method in a controller, which takes to the edit page of a contact where user can edit the contact and save.
How do i compare the old and new values of that contact ?

apex Controller
==============

public pageReference gotoContactEditPage()
{
             PageReference conEditPage = new PageReference('/' + contactId+ '/e');         
             conEditPage.setRedirect(true);
            // Here i want to compare the old and new values of contact (before save and after save)
             return conEditPage
           


}

 
Hi,

I am creating a pageblock table and usign the below component to have pagination.
http://blogforce9.blogspot.com/2013/11/pageblocktableenhanceradv-yet-another.html
Now I want to have checkboxes in the table with the below functionalities
1: select all
2: select individual records trough paginating.
Currently I have implemented something with wrapper class and js, but it is working only for 2nd option not for first,

Has anyone implemented such requirement?  Pls help.

Thanks,
Anupama

 
Hi,


I am trying to execute the following soql queris using bulk API / workbench / Developer console, but I am not able to retrieve the result without filter on Ids.

SELECT Id FROM IdeaComment;

How do I get the result of soql queries without filter on Id.

Hi,

 

Is there any built in method in apex to convert a random date to user local date format?

or

is there any built in method in apex to get the date format of the user local.

for Ex : UserInfo.getLocale(); gives the user local, same way any built method to get the date format like dd/mm/yy etc..

Hi,

 

I have two dropdown boxes in my visualforce page namely "ListOfObjects and ListOfFields".

ListOfObjects: displays all the objects in the salesforce

ListOfFields : Displays all the fields belong to the selected object in the 'ListOfObjects' drop down box.

 

Once I select the field from ListOfFields it will fetch the metadata of that particular field and keeps on concatinating/Appending to the finalString (a variable)  based on the number of  fields selected.

How to make the variable finaltring to retain the previous String also once the objectname is changed in ListOfObjects box.

 

ex: first time if I select object Account and its fileds id and name , the finalstring contains the metadata of id and name fields,. Next if I select object Contact and field createddate within contact, then my finalString should display metadata of id,name,createddate.

 

Here is my code...

 

<apex:page controller="ListObjects" >    

    
    <apex:messages />

 <apex:pageBlock >
        <apex:form >
                                          
            <apex:ActionFunction name="loadField" reRender="fields"  status="myStatus,result" action="{!loadNewFieldSet}">
            </apex:ActionFunction>    
            
            <apex:ActionFunction name="DescribeSelectedFields" reRender="fieldsLabel,result"  status="myStatus" action="{!LoadFieldsLabel}">
            </apex:ActionFunction>                   
                                   
                <apex:SelectList value="{!selectedObject}" size="1" multiselect="false"  label="ListOfObjects" onchange="loadField();"  id="ObjId" style="width:100%" >
                    <apex:SelectOptions value="{!Names}">
                    </apex:SelectOptions>                                    
                </apex:SelectList>

                <apex:SelectList value="{!FieldValues}" size="10" multiselect="true" label="ListOfFields" onclick="DescribeSelectedFields();" id="fields" style="width:100%">
                    <apex:SelectOptions value="{!fieldsList}">
                    </apex:SelectOptions>                                       
                </apex:SelectList>
                                          
                                                             
                 </apex:form>    
                 
             <apex:outputlabel id="result">
                 {!value1}
                 </apex:outputlabel>                
                               
      
    </apex:pageBlock>
 
</apex:page>

 

====================

public  class ListObjects
{

   /* public PageReference CheckObjExists1() {
         ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Your Message'));
        return null;
    } */

     public ListObjects()
       {
          fieldsList = new List<SelectOption>();
        
       }
 
   
      public string value1 {get;set;}
  //  List<Schema.DescribeFieldResult>  allesults ;
            
      public List<SelectOption> fieldsList {get;set;}
      public List<SelectOption> DescfieldsLabel { get; set; }
      public String FieldLabels { get; set; }
      public String[] FieldValues { get; set; }
      public String selectedObject { get; set; }
      string finalstring = 'label,type,length,visibleLines';     
      
            
         
     public List<SelectOption> getNames()
      {
            List<Schema.SObjectType> gd = Schema.getGlobalDescribe().Values();     
            List<SelectOption> options= new List<SelectOption>();
    
                for(Schema.SObjectType f : gd)
                    {
                       options.add(new SelectOption(f.getDescribe().getName(),f.getDescribe().getName()));
                       //  System.debug(gd);
                       options.Sort();
                    }
           return options;
     }
     
     public  void loadNewFieldSet()
     {      
         Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get(selectedObject).getDescribe().fields.getMap();
         fieldsList  = new list<SelectOption>();       
         //system.debug(selectedObject);
             
            for(String s : objectFields.keySet())
             {
                  fieldsList .add( new SelectOption(s,s));
                  fieldsList.Sort();
             }        
          
     }
        
       
     public void LoadFieldsLabel()
     {
     
         Map<String, SobjectField> fieldMap = Schema.getGlobalDescribe().get(selectedObject).getDescribe().fields.getMap();
        // DescfieldsLabel  = new list<SelectOption>();
         List<Schema.DescribeFieldResult>  fresults = new List<Schema.DescribeFieldResult>();
         string header = 'fullName,label,type,length,visibleLines \n';
         string finalstring = header;     
         
               for(String f:FieldValues)                 
            
               {
                    fresults.add( fieldMap.get(f).getDescribe());             
                    String name = fieldMap.get(f).getDescribe().getName();         
                    String label = fieldMap.get(f).getDescribe().getLabel();
                    DisplayType fieldtype = fieldMap.get(f).getDescribe().getType();
                    Integer length = fieldMap.get(f).getDescribe().getLength();
                    
                    string recordString =   name + ',' +label + ',' + fieldtype + ',' + length + '\n';
                   // String newlinestr = recordString;
                   
                 finalstring = finalstring + recordString;          
                // displaySelectedFieldsMetadata(recordString);
                value1 = finalstring ;                     
                    
                   
                                       
               }      
           }    
               
       /* public void displaySelectedFieldsMetadata(String recordString)
              {
             
                  finalstring = finalstring + recordString;
                  value1 = finalstring ;            
                    
            }    */    
                 
  }

 

Pls help..

Thanks in advance :)