• akschamp
  • NEWBIE
  • 60 Points
  • Member since 2009

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 26
    Replies
Hi all, Urgent help required!!!! We have a requirement of opening a popup onselecting a checkbox. Iam able to open a visual force page from a visual force page after selecting check box. Both VF Pages are defined with extensions as same controller. When the pop up opens, the values in the controller are reset to null. How do i maintain session in between these two pages and use the values in the controller in the second page also. Thanks in Advance Nag
  • February 04, 2009
  • Like
  • 0

Currently we are in situaiton where we have to import Archived Articles from other system into SFDC, but Import says that ArchivedDate field is read only and is not creatable due to which we are not able to import those articles.

 

Another thing is that the other system has articles archived with old date and SFDC Knowledge only allowes archived date as today and future dates. 

 

Is there any work around to resolve these issues?

 

Hi..

 

I have an requirement to redirect user to a VF page once he finish with Excel download. 

 

there is a some workaround of iframe is given in following link : http://salesforce.stackexchange.com/questions/5479/page-redirect-after-export-to-xl

 

But not much clear. could you please help me on this. 

 

Many thanks.

 

 

Hi..

 

I've a requirement of providing download functionality from Vf page. I'me finished with downloading functionality but once user clicks on download button and complete with file download then need to do somes updates in custom object, so is there ay way where I can detect that file download is complete (IE, chrome and mozilla browser)? 

Hi All,

 

I have created List button on Custom Object list View, On click of that button All I want is to open VF page in new Window and pass parameters to that page

 

var listparm = {!GETRECORDIDS( $ObjectType.Candidate__c)};

 

window.open('/apex/SendEmailToList');

 

As I have the parameters of length upto 500 ID's, I dont want to pass in the URL to VF page.

 

is there any other way to pass parameters array to VF page from Javascript without appending in URL.

 

It's really urgent please let me know..........

 

 

Hi...

 

How to include static resource files in the javascript using "Requirescript", please let me know.....

 

For Ex. On detail click files from my static resource, i have used following but it gives me error.......

 

On detail buton click below javascript is called to display popup...but not working

 

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/13.0/apex.js")}

{!requireScript("/js/jquery-ui-1.7.2.custom.min.js")}


{!requireScript("/js/jquery-1.3.2.min.js")}

{!requireScript("development-bundle/ui/ui.core.js")}

{!requireScript("/development-bundle/ui/ui.dialog.js")}

{!requireScript("/development-bundle/ui/ui.draggable.js.core.js")}

{!requireScript("/development-bundle/themes/base/ui.all.css")}

 

 

document.body.innerHTML +="";

 

   document.body.innerHTML  += "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://jqueryui.com/themes/base/jquery.ui.all.css\"><link rel=\"stylesheet\" type=\"text/css\" href=\"http://jqueryui.com/demos/demos.css\"><div id='dialog-message' title='Pubish Description'>hi1234</div>";





                

           $(function() {
            // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
        $("#dialog-message").dialog("destroy");
                $("#dialog-message").dialog( "moveToTop" )
               $("#dialog-message").dialog( "enable" )
            $("#dialog-message").dialog({
                modal: true,
                width: 500,
                buttons: {
                    Save: function() {
                        alert("hi123");
                        $(this).dialog('close');
                    }
                }
            });
        });























 

Hi....

 

As am new to SF, can anyone please let me know how can i override the action of the delete button in the related list.

 

 

Thanks

 

Hi.....

 

I have the list of ID's only of standard/custom objects......

 

I want to get comman data for field 'lastactivitydate' for each object present in that list using id's of the same....how can i get...

 

for Ex i have record id '0013000000ZEghO' for , then how should i get 'Last activitydate' for this?

 

any suggestions or solutions....please let me know...

 

Many thanks,

Akshay

Hi, I have one custom tab named Add Questions in which i took following 3 fields

 

1. Date

2. Number

3. Picklist

 

Now I have created one VF page AddQextend in which i have used controller extrention for aobe mentioned custom tab, In this VF page I have added all three input fields(as above) of the custom tab + 1 textbox(created on VF page), So totally on VF page I have 4 fields.also for this page i wrote the Apex controller class.

 

I used standard commandbutton  with {!save} method to save the values of this VF page. 

 

Then I overrided the existing custom tab Add Questions by VF page AddQextend for (Edit, view)

 

then i selected my custom tab, and clicked new to add recod in custom tab (which is now overrided)

 

There are 4 fields (Date, Number, Picklist and Textbox) and save button, Then i Entered values and save the record, and when i try to view that record it shows the values in 3 (Date, Number, Picklist) fields, but shows Textbox field empty

 

 

Please can anyone help me  on this?

 

I have one picklist with me, and i am trying to get the selected value of the picklist. below is the code

 

 

VF page :

 

                               <apex:outputlabel value="Select City" for="values" />

                                <apex:actionSupport event="onchange" action="{!getcitylist}" rerender="txt_city"/>                                   
                                 <apex:selectList value="{!cities}" size="1">
                                      <apex:selectOptions value="{!showcities}"/>
                                 </apex:selectList>

                                  <apex:inputText id="txt_city"/>

 

Apex Code :

 

      String sel_city;

      public String cities
        {
            get {return sel_city;}
            set {sel_city=value;}
        }

 

       public List<selectOption> getshowcities()
    {

            List<selectOption> Selectcity = new List<selectOption>();

              List<Regstr__c> citylist = new List<Regstr__c>();
              courselist = [Select  id, city_name__c FROM Regstr__c ];


              SelectCourse.add(new SelectOption('0','Select city'));


              for (Integer j=0;j<citylist .size();j++)
              {

                 
                  Selectcity .add(new SelectOption(citylist [j].id,citylist [j].city_name__c));
                 
              }      
            return Selectcity ;

    }  

   public void getcitylist()  //this function is called onchange event of dropdown

   {

         //once the selected item in the city drop down is changes, here i have to save the selected value of "city"dropdown  list in textbox "txt_city"

      

   }

 

 

 

I am new to salesforce, please suggest me how to write the scipt to save the value of dropdown in textbox.

 

 

Thanks in advance!!!!!!!!!!!!!!!!!!!!!!

HI ,


I have 3 fields, one is required field (Product__c)have in one pageblock section section and one more section i have two fileds, such as(Type__c= Mechanic and seviarty__c=Admin.).

When ever i can set  for those fileds then now i want remove required for (Product__c) this filed.

Can you please sugggested me, with example code in apex class .

Thank you,
Chanti

 
Hello,

Is it possible to include a visualforce (or HTML) page in a visualforce email template?

The use case is I have a set of data that changes, but needs to be appended to several different kinds of emails.  I would like to keep this data in a single visualforce page which I can update only once, and automatically include it at the end of the various other email templates I create.  

(I new here).  Thanks for the help.

I want to update case and prevent case status updation on update of Task. Task has 5 recordtypes which are FC, Repo, ST, Auction and Legal Assessment and these record types have different statuses for completion of Task which are Resolved, Repo, Located, Proceed and Complete respectively.
So whenever I complete a task, case statuses changes to Intermediate Review, Intermediate Review, Intermediate Review, Intermediate Review and Final Review respectively (depending on the Completion status of Task of that particular Task recordType).

Here is the requirement I am facing difficulty with: If a Case has a Status of ‘Legal Assessment’ and an incomplete Task of 'Legal Assessment', then completion of another incomplete Task will not override the Case Status

Can anyone help me with a logic here?
We need to display formatted text message in Message field of Quick Text. So we created a custom field message and tried to display it's value in Message standard field using merge field {!QuickText_msg}. But this does not work. Tried other merge fields as well but none of them worked. Please advise.

I have included Chineese and english in translation workbech for one of my organizations. Is there a way to access active languages name in Apex Code ?

 

Thanks

Jaffer

I am getting an error an just want to render the current choose task comments. Here is my code

 

public class TaskController{
   
    public Task tsk{get;set;}
    public TaskController(){     
        tsk=[select Id, Description from Task where Id = :ApexPages.currentPage().getParameters().get('id') limit 1];
        tsk.Description=tsk.Description.replace('\n','<br/>');      
    }  
}

 

<apex:page controller="TaskController" showHeader="false" renderAs="PDF">
    <div align="center" width="550px">
        <h1>Current Email</h1>
    </div>   
    <div align="left" width="550px">
         <apex:outputtext escape="false" value="{!tsk.Description}"></apex:outputtext>       
           </div>         
</apex:page>

 

When I selected just the description it gave me the first item in the list.

  • September 17, 2013
  • Like
  • 0

Hi..

 

I've a requirement of providing download functionality from Vf page. I'me finished with downloading functionality but once user clicks on download button and complete with file download then need to do somes updates in custom object, so is there ay way where I can detect that file download is complete (IE, chrome and mozilla browser)? 

I have created a VF page and controller apex as follows:

 

The Apex Class.... 

public class GenPortableFAData    

{

    public GenPortableFAData(ApexPages.StandardController controller) {      

    }

    public Fixed_Asset__c[] getGenPortableFAData()

    {

    string CId;        

    CId = ApexPages.CurrentPage().getParameters().get('id');        

    Configuration__c [] CFList;        

    Fixed_Asset__c [] FAList;          

    CFList = [select Configuration__c.Id from Configuration__c where Configuration__c.Id = :CId];        

    FAList = [select Fixed_Asset__c.Id, Fixed_Asset__c.Asset_Tag__c, 

        Fixed_Asset__c.Description__c,   Fixed_Asset__c.Location_Info__c, Fixed_Asset__c.Condition__c

        from Fixed_Asset__c where AcctSol__Fixed_Asset__c.Configuration__r.Id = :CId];          

     return FAList;      

    }    

}

 

The VF Page:

 

<apex:page standardController="Configuration__c" extensions="GenPortableFAData" contentType="text/tab-separated-values#S01_Data.txt">

<apex:repeat value="{!GenPortableFAData}" var="fixedasset">

{!fixedasset.Id}{!fixedasset.Asset_Tag__c}{!fixedasset.Description__c}{!fixedasset.Location_Info__c}{!fixedasset.Condition__c}

</apex:repeat>

</apex:page>

 

It is working fine in that the records that I want to appear are appearing - it is creating the text file with the name I provided and it's all good... somewhat.

 

But I have a few problems....

1. I need the columns to be delimited by TABs and I don't know what contentType to use ?

2. The output file contains a single blank line at the top of the file and then the data records - how do I lose the blank line ?

3. I need to add a last column for each record that is the current system date/time (e.g System.today()) ?

 

Any assistance that you could provide would be GREATLY appreciated !!

The Newest of Newbies

AngiB

 



I currently have a date field that displays a date 3 days from the date the form is opened. Here is the formula I used: TODAY() + 3

 

I would like to modify the formula to show a value of 3 business days instead of 3 days.  Can someone help?


Thanks in advance.

  • March 16, 2011
  • Like
  • 1

Hi

i wants to provide facility to files which i uploaded

i wants implement this in visualforce page

 

please put code also

thanks in advance

 rajesh

Is it normal or a bug? I've noticed that a Formula field value in trigger.Old and trigger.New is not evaluating. I'm facing issues with evaluating value change in trigger code for Formula field.

 

Has anyone also noticed this? Is it normal  to observe this behavior?

  • October 21, 2010
  • Like
  • 0

Hi....

 

As am new to SF, can anyone please let me know how can i override the action of the delete button in the related list.

 

 

Thanks

 

Hi.....

 

I have the list of ID's only of standard/custom objects......

 

I want to get comman data for field 'lastactivitydate' for each object present in that list using id's of the same....how can i get...

 

for Ex i have record id '0013000000ZEghO' for , then how should i get 'Last activitydate' for this?

 

any suggestions or solutions....please let me know...

 

Many thanks,

Akshay

Hi,

I have copied text from an exisitng long text area field to a new rich text area field successfully using the following apex method (Encapsulation_NewInstructions__c is a rich text area field):

 

WebService static void UpdateEncapsSteps()

{

List <Solution> solutions = new List<Solution>();

for (Solution mySol : [Select Id, Encapsulation_Instructions__c, Encapsulation_NewInstructions__c From Solution])

{

mySol.Encapsulation_NewInstructions__c = mySol.Encapsulation_Instructions__c;

solutions.add(mySol);

}

update solutions;

}

 

All went well except text have been copied without the break lines (I suppose that in long text area break line is '/r/n' and the new rich text area field doesn't know to convert it into an HTML structure).

 

for example:

 

The origin was:

"straight forward. Need to run the Encapsulator from a short path (For example E:\43a and not C:\documents and settings\user\desktop\encapsulator 1.0.0.43a').
Otherwise, the encapsulation fails." 

 

The result was:

straight forward. Need to run the Encapsulator from a short path (For example E:\43a and not C:\documents and settings\user\desktop\encapsulator 1.0.0.43a'). Otherwise, the encapsulation fails.

 

How can I convert text to HTML format and saving the structure?

Do I have build in method for this?

 

Thanks

Shuky

 

Hi all, Urgent help required!!!! We have a requirement of opening a popup onselecting a checkbox. Iam able to open a visual force page from a visual force page after selecting check box. Both VF Pages are defined with extensions as same controller. When the pop up opens, the values in the controller are reset to null. How do i maintain session in between these two pages and use the values in the controller in the second page also. Thanks in Advance Nag
  • February 04, 2009
  • Like
  • 0
Hello,

I like the concept of using custom component to encapsulate generalized UI and being able to use in more than one visual force page with different sets of data.

However, I have a situation where I use apex components, within a custom component, with id attributes. This is creating a problem when multiple instances of the custom component is used in same visual force page.

Is this a serious limitation? Something like 'prependId' attribute, of an <apex:form> tag, could help - so that unique child client-ids could be generated for all tags/components inside a custom component and provide some mechanism to refer it in attributes like 'rerender', 'status' etc (just like using {!$Component} object in a javascript DOM to access HTML objects).

My situation:
The controller class IPIBAs guarantees different sets of data with different parameters. The controller used in the page has multiple references to instances of IPIBAs created with different parameters.


Component Code:
<apex:component>
  <apex:attribute required="true" name="ipIBAs" type="IPIBAs" description="" />
  <apex:outputPanel style="height:15px;" layout="block">
    <apex:actionStatus startText="loading..." stopText="" id="panelIPIBAsStatusLoading" />
    <apex:actionStatus startText="saving..." stopText="" id="panelIPIBAsStatusSaving" />
    <apex:actionStatus startText="cancelling..." stopText="" id="panelIPIBAsStatusCancelling" />
    <apex:actionStatus startText="deleting..." stopText="" id="panelIPIBAsStatusDeleting" />
  </apex:outputPanel>
  <apex:outputPanel id="panelIPIBAs" layout="block">
    <apex:form rendered="{!(ipIBAs.viewMode == 1)}">
      <apex:pageBlock title="Activities :: Listings">
        <apex:pageBlockButtons>
          <apex:commandButton value="Edit" rerender="panelIPIBAs" rendered="{!(ipIBAs.ipIBAsCount > 0)}" status="panelIPIBAsStatusLoading">
            <apex:param value="2" assignTo="{!ipIBAs.viewMode}" />
          </apex:commandButton>
        </apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock> </apex:form> <apex:form rendered="{!(ipIBAs.viewMode == 2)}"> <apex:pageBlock title="Activities :: Edit"> <apex:pageBlockButtons> <apex:commandButton value="Save" rerender="panelIPIBAs" action="{!ipIBAs.save}" status="panelIPIBAsStatusSaving" /> <apex:commandButton value="Cancel" rerender="panelIPIBAs" action="{!ipIBAs.cancel}" status="panelIPIBAsStatusCancelling" /> </apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock>
</apex:form>
<apex:form rendered="{!(ipIBAs.viewMode == 3)}">
<apex:pageBlock title="Activities :: New">
<apex:pageBlockButtons>
<apex:commandButton value="Save" rerender="panelIPIBAs" action="{!ipIBAs.saveNewRecord}" status="panelIPIBAsStatusSaving" />
<apex:commandButton value="Cancel" rerender="panelIPIBAs" action="{!ipIBAs.cancelNewRecord}" status="panelIPIBAsStatusCancelling" />
</apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock>
</apex:form>
<apex:form rendered="{!(ipIBAs.viewMode == 4)}">
<apex:pageBlock title="Activities :: Confirm Delete">
<apex:pageBlockButtons>
<apex:commandButton value="Yes" rerender="panelIPIBAs" action="{!ipIBAs.deleteSelected}" status="panelIPIBAsStatusDeleting" />
<apex:commandButton value="No" rerender="panelIPIBAs" action="{!ipIBAs.cancelDelete}" status="panelIPIBAsStatusCancelling" />
</apex:pageBlockButtons>
<!-- other fields here -->
</apex:pageBlock>
</apex:form>
</apex:outputPanel>
</apex:component>

 
Whenever I try to include two or more of this component, I get

Error: Duplicate ids have been detected: 'panelIPIBAsStatusLoading'

How could visualforce ensure unique 'clientid's would be generated for child components of a custom component?

Any suggessions?

Thanks,
TheColdFusion