• Mahendiran Jayavarma
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 16
    Replies

Hi,

 

What is modules in salesforce and what are modules available in salesforce

 

Thanks,

mahendiran

Hi,

 

What is modules in salesforce and what are modules available in salesforce

 

Please,

mahendiran

Hi,

 

Im trying to create user in my force.com site. Actually I have enable the login and the license type that is used is the customer portal manager license. Im trying to create customer portal user. But I could not create.

 

If I register the user Im getting error for "Your request cannot be processed at this time.The site administrator has been alerted"

 

Please help me for this.

 

 

Thanks,

Mahendiran.

Hi,

 

Im trying to create user in my force.com site. Actually I have enable the login and the license type that is used is the customer portal manager license. Im trying to create customer portal user. But I could not create.

 

If I register the user Im getting error for "Your request cannot be processed at this time.The site administrator has been alerted"

 

Please help me for this.

 

 

 

Thanks,

Mahendiran.

Hi,

 

Im trying to create user in my force.com site. Actually I have enable the login and the license type that is used is the customer portal manager license. Im trying to create customer portal user. But I could not create. Please help me.

 

Thanks,

Mahendiran.

Hi,

 

If i am having pageblocktable and button control in a page.

 

when i click that button I need to send mail for pageblocktable records as a PDF format.

 

I tried like

 

 


<apex:page controller="sendEmail">
<apex:form>
<apex:pageblockTable value="{!Activities}" var="c" id="results" > <apex:column > <apex:facet name="header"> <apex:inputCheckBox value="{!selectAllCheckbox}" onclick="checkAll(this)"> <apex:actionSupport event="onclick" action="{!selectAll}" rerender="results"/> </apex:inputCheckBox> </apex:facet> <apex:inputCheckBox value="{!c.selected}"/> </apex:column> <apex:column value="{!c.acct.subject}"/> <apex:column value="{!c.acct.Id}"/> <apex:column value="{!c.acct.owner.name}"/> <apex:column value="{!c.acct.Billable_Hrs__c}"/> <apex:column value="{!c.acct.Rate_Hrs__c}"/> <apex:column value="{!c.acct.Billable_Amount__c}"/> </apex:pageblockTable>
<apex:commandbutton value="send mail" action="{!send}"/>

</apex:form>
</apex:page>





conroller:

public class sendEmail { 
 

    public PageReference send() {
        // Define the email  
    
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 

  

        // Take the PDF content
 
  PageReference pdf = page.sendemail;
  pdf.getParameters().get('results');
  Blob b = pdf.getContent();
  

        // Create the email attachment
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
        efa.setFileName('attachment.pdf');
        efa.setBody(b);


  

        // Sets the paramaters of the email  
    
        email.setSubject( subject );
        email.setToAddresses(new string[] {'mahe2682@gmail.com'});
 
        email.setPlainTextBody( body );

        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});

        // Sends the email  
    
        Messaging.SendEmailResult [] r = 
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});   
        
        return null;
    }
}



 

 

 

 

actually It will generate pdf  file but i could not open the file.

 

give me solution for how to resove it.

 

Thanks,

Mahendiran.

 

 

 

 

 

Hi,

 

I wants to sum the billable amount for checked rows only when clicking generate button.

 

 

 

 

 

Controller:

 

public class ActivityController 
{

    public PageReference Search() {
    return null;
        }

Task Task;

public Task getTask() {
      if(Task == null) Task = new Task ();
      return Task ;
   }

    Public Task[] getActivities()
    { 
      
   
      return [Select id, subject,activitydate,owner.name,pro__Billable_Hrs__c,pro__Rate_Hrs__c,pro__Billable_Amount__c from Task];
    }


 
}

Apex Code:

 

 

<apex:page controller="ActivityController"  >
 <apex:sectionHeader title="Invoice Generate" />

 <apex:form >
<apex:pageBlock >

<apex:pageBlockSection title="Search Task" columns="4" >


<apex:inputField id="Taskstatus" value="{!Task.status}" style="width:150px;"/> 

<apex:commandButton value="Search" action="{!Search}"/>


</apex:pageBlockSection>
<apex:pageBlockSection title="Search Result" columns="1" >
<apex:pageBlockTable value="{!Activities}" var="a" width="750">
  <apex:column >
                        <apex:facet name="header">Select</apex:facet>
                        <apex:inputCheckbox value="{!a.Id}" />
                </apex:column>

<apex:column value="{!a.subject}" rendered="true"/>
<apex:column value="{!a.owner.name}"/>
<apex:column value="{!a.Billable_Hrs__c}"/>
<apex:column value="{!a.Rate_Hrs__c}"/>
<apex:column value="{!a.Billable_Amount__c}"/>
</apex:pageBlockTable>

</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Generate"/>
</apex:pageBlockButtons>
</apex:pageBlock></apex:form>
</apex:page>

 

 

Help me....

 

Thanks,

 

Mahendiran

Hi,

 

Please guide me for filtering records in pageblocktable using dropdonlist.

 

I tried to implement using following code. But I could not  implement. So Please help me.

 

 

Controller:

 

public class ActivityController 
{

    public PageReference Search() {
    return null;
        }

Task Task;

public Task getTask() {
      if(Task == null) Task = new Task ();
      return Task ;
   }

    Public Task[] getActivities()
    { 
      
   
      return [Select id, subject,activitydate,owner.name,pro__Billable_Hrs__c,pro__Rate_Hrs__c,pro__Billable_Amount__c from Task];
    }


 
}

 

Apex page:

 

<apex:page controller="ActivityController"  >
 <apex:sectionHeader title="Invoice Generate" />

 <apex:form >
<apex:pageBlock >

<apex:pageBlockSection title="Search Task" columns="4" >


<apex:inputField id="Taskstatus" value="{!Task.status}" style="width:150px;"/> 

<apex:commandButton value="Search" action="{!Search}"/>


</apex:pageBlockSection>
<apex:pageBlockSection title="Search Result" columns="1" >
<apex:pageBlockTable value="{!Activities}" var="a" width="750">
  <apex:column >
                        <apex:facet name="header">Select</apex:facet>
                        <apex:inputCheckbox value="{!a.Id}" />
                </apex:column>

<apex:column value="{!a.subject}" rendered="true"/>
<apex:column value="{!a.owner.name}"/>
<apex:column value="{!a.Billable_Hrs__c}"/>
<apex:column value="{!a.Rate_Hrs__c}"/>
<apex:column value="{!a.Billable_Amount__c}"/>
</apex:pageBlockTable>

</apex:pageBlockSection>
</apex:pageBlock></apex:form>
</apex:page>

 

Help me asp.

 

Thanks,

Mahendiran

Hi,

 

Im trying to create user in my force.com site. Actually I have enable the login and the license type that is used is the customer portal manager license. Im trying to create customer portal user. But I could not create.

 

If I register the user Im getting error for "Your request cannot be processed at this time.The site administrator has been alerted"

 

Please help me for this.

 

 

Thanks,

Mahendiran.

Hi,

 

Im trying to create user in my force.com site. Actually I have enable the login and the license type that is used is the customer portal manager license. Im trying to create customer portal user. But I could not create.

 

If I register the user Im getting error for "Your request cannot be processed at this time.The site administrator has been alerted"

 

Please help me for this.

 

 

 

Thanks,

Mahendiran.

Hi,

 

Im trying to create user in my force.com site. Actually I have enable the login and the license type that is used is the customer portal manager license. Im trying to create customer portal user. But I could not create. Please help me.

 

Thanks,

Mahendiran.

Hello,

 

I need to have Salesforce and VISUAL Manufacturing integrated.  The VISUAL Manufacturing application is created by Lily Software Associates, Inc.  Our goal is for specific information from VISUAL to appear within Salesforce (i.e. customer contact details, accounting & order history).  The information will be used by our Sales and Account Management Teams. 

 

I'd like to hire a developer to complete this project.  Please respond to this message if you have successfully integrated VISUAL with Salesforce in the past or are confident that you can complete the project.  This is a project that will need to be completed in the very near future in order to support our growing company. 

 

Emily

Hi,

 

If i am having pageblocktable and button control in a page.

 

when i click that button I need to send mail for pageblocktable records as a PDF format.

 

I tried like

 

 


<apex:page controller="sendEmail">
<apex:form>
<apex:pageblockTable value="{!Activities}" var="c" id="results" > <apex:column > <apex:facet name="header"> <apex:inputCheckBox value="{!selectAllCheckbox}" onclick="checkAll(this)"> <apex:actionSupport event="onclick" action="{!selectAll}" rerender="results"/> </apex:inputCheckBox> </apex:facet> <apex:inputCheckBox value="{!c.selected}"/> </apex:column> <apex:column value="{!c.acct.subject}"/> <apex:column value="{!c.acct.Id}"/> <apex:column value="{!c.acct.owner.name}"/> <apex:column value="{!c.acct.Billable_Hrs__c}"/> <apex:column value="{!c.acct.Rate_Hrs__c}"/> <apex:column value="{!c.acct.Billable_Amount__c}"/> </apex:pageblockTable>
<apex:commandbutton value="send mail" action="{!send}"/>

</apex:form>
</apex:page>





conroller:

public class sendEmail { 
 

    public PageReference send() {
        // Define the email  
    
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 

  

        // Take the PDF content
 
  PageReference pdf = page.sendemail;
  pdf.getParameters().get('results');
  Blob b = pdf.getContent();
  

        // Create the email attachment
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
        efa.setFileName('attachment.pdf');
        efa.setBody(b);


  

        // Sets the paramaters of the email  
    
        email.setSubject( subject );
        email.setToAddresses(new string[] {'mahe2682@gmail.com'});
 
        email.setPlainTextBody( body );

        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});

        // Sends the email  
    
        Messaging.SendEmailResult [] r = 
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});   
        
        return null;
    }
}



 

 

 

 

actually It will generate pdf  file but i could not open the file.

 

give me solution for how to resove it.

 

Thanks,

Mahendiran.

 

 

 

 

 

Hi,

 

Please guide me for filtering records in pageblocktable using dropdonlist.

 

I tried to implement using following code. But I could not  implement. So Please help me.

 

 

Controller:

 

public class ActivityController 
{

    public PageReference Search() {
    return null;
        }

Task Task;

public Task getTask() {
      if(Task == null) Task = new Task ();
      return Task ;
   }

    Public Task[] getActivities()
    { 
      
   
      return [Select id, subject,activitydate,owner.name,pro__Billable_Hrs__c,pro__Rate_Hrs__c,pro__Billable_Amount__c from Task];
    }


 
}

 

Apex page:

 

<apex:page controller="ActivityController"  >
 <apex:sectionHeader title="Invoice Generate" />

 <apex:form >
<apex:pageBlock >

<apex:pageBlockSection title="Search Task" columns="4" >


<apex:inputField id="Taskstatus" value="{!Task.status}" style="width:150px;"/> 

<apex:commandButton value="Search" action="{!Search}"/>


</apex:pageBlockSection>
<apex:pageBlockSection title="Search Result" columns="1" >
<apex:pageBlockTable value="{!Activities}" var="a" width="750">
  <apex:column >
                        <apex:facet name="header">Select</apex:facet>
                        <apex:inputCheckbox value="{!a.Id}" />
                </apex:column>

<apex:column value="{!a.subject}" rendered="true"/>
<apex:column value="{!a.owner.name}"/>
<apex:column value="{!a.Billable_Hrs__c}"/>
<apex:column value="{!a.Rate_Hrs__c}"/>
<apex:column value="{!a.Billable_Amount__c}"/>
</apex:pageBlockTable>

</apex:pageBlockSection>
</apex:pageBlock></apex:form>
</apex:page>

 

Help me asp.

 

Thanks,

Mahendiran

I am writing my own save method for the user custom page which is created by using the standard controller as a User.

when i am trying to write the controller code that time it is not allowing the use.UserType = cntr.UserType .Giving compilatin Error like 
Error: Compile Error: Field is not writeable: User.UserType at line 51 column 6 

Remaing fields are allowed to write.

Why it is not allowing to compile the controller?

Can anyone phased this situation?

 how can i use for UserType Field.

For more clarity on my problem i am just giving my custom page code and controller code  which is given below.

 

custom user Page :

 

<apex:page standardController="User" extensions="usercontroller" >

<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="User Information">

<apex:inputField id="userFirstName" value="{!user.firstname}"/>
<apex:inputField id="userLastName" value="{!User.lastName}"/>
<apex:inputField id="userAlias" value="{!User.alias}"/>
<apex:inputField id="userEmail" value="{!User.email}"/>
<apex:inputField id="userUserName" value="{!User.UserName}"/>
<apex:inputField id="userLicense" value="{!User.UserType}"/>
<apex:inputField id="userEmailEncoding" value="{!user.title}"/>
<apex:inputField id="userCommunityNickName" value="{!User.communityNickName}"/>
<apex:inputField id="userrole" value="{!User.UserRoleId}"/>
<apex:inputField id="userProfileId" value="{!User.ProfileId}"/>
<apex:inputField id="userEmailEncodingKey" value="{!User.EmailEncodingKey}"/>
<apex:inputField id="userlanguage" value="{!User.LanguageLocaleKey}"/>
<apex:inputField id="userlocale" value="{!User.LocaleSidKey}"/>
<apex:inputField id="userTimezone" value="{!User.TimeZoneSidKey}"/>
</apex:pageBlockSection>

<apex:pageBlockButtons >
<apex:commandButton action="{!Save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="cancel"/>
</apex:pageBlockButtons>

</apex:pageBlock>
</apex:form>
</apex:page>

 

Custom controller:

public class usercontroller {

private User cntr;
private final ApexPages.StandardController controller;

    public usercontroller(ApexPages.StandardSetController controller) {
   
   

    }

 

 //
    public usercontroller(ApexPages.StandardController controller) {


         this.controller = controller;

    cntr= (User )controller.getRecord();

    }

 

   
public PageReference Test()
  
     {
            
        PageReference pageRef = new  PageReference('https://na6.salesforce.com/apex/newuser');
       
         pageRef.setRedirect(true);
         return pageRef ;
      
      
    }  

public PageReference Save()
  
     {
    
     User use = new User();
    
     use.firstname = cntr.firstname;
     use.lastName =cntr.lastName;
     use.alias =cntr.alias;
     use.email =cntr.email;
     use.UserName =cntr.UserName;
     use.UserType =cntr.UserType;
     use.title =cntr.title;
     use.communityNickName =cntr.communityNickName;
     use.UserRoleId =cntr.UserRoleId;
     use.ProfileId =cntr.ProfileId;
     use.EmailEncodingKey =cntr.EmailEncodingKey;
     use.LanguageLocaleKey =cntr.LanguageLocaleKey;
     use.LocaleSidKey =cntr.LocaleSidKey;
     use.TimeZoneSidKey =cntr.TimeZoneSidKey;
    
    
    
    
    
      insert use ;

            
        PageReference pageRef = new  PageReference('https://c.na6.visual.force.com/apex/users');
          pageRef.setRedirect(true);
         return pageRef ;
      
      
    } 

 

}

 

Welcome to this new discussion board.  Post your questions, comments and discussions about Force.com Sites to this board.  If you have questions about pure Visualforce, post those to the Visualforce discussion board.

Thank you
Jon
Message Edited by Jon Mountjoy_ on 06-14-2009 11:10 PM
Hi,
 
We have a requirement where we need to fetch the filter criteria entered by user in the visualforce page and display the report. I have created 3 picklist field for this and when i click on generate report the report is not accurate.
 
Could anyone please help me with where iam going wrong.
 
The code for is
Code:
...
<apex:pageBlock title="Enter Filter Criteria"> 
<apex:form >
<b>Marketing Domain</b>
<apex:selectList id="domain" size="1" >
<apex:selectOptions value="{!items}"/>
</apex:selectList> 
....

<apex:commandButton value="Generate Report"  action="{!reset}">
</apex:commandButton>
.....

 

The code for controller class is

Code:
....
public Account[] getAccount()
 { 
   accounts = [Select Name,Customer_Rating1__c,Target_Visit__c,salesdistrict__c,Achieved__c,To_Be_Achieved__c from Account where Marketing_Domain__c=:ApexPages.currentPage().getParameters().get('domain')];
      return accounts;
 }
....

public PageReference reset() {
    PageReference newpage = new PageReference(System.currentPageReference().getURL());
    newpage.setRedirect(true);
    return newpage;
  }
...


 Please Help.

Thanks in advance

Priya Nair


 
  • August 04, 2008
  • Like
  • 0

I got error "Time limit exceeded-Your request exceeded the time limit for processing. " when generating PDF file by following code frequently. Is there any way to set the Time Limit to a larger value?
Code:
public class MyController {     
    public PageReference getDeliverAsPDF() {     
        // Reference the page, pass in a parameter to force PDF     
        PageReference pdf = ApexPages.currentPage();     
        pdf.getParameters().put('p','p');      
        pdf.setRedirect(false);     
    
        // Grab it!      
        Blob b = pdf.getContent();     
        
        //Prepare Parameters
        Id id= System.currentPageReference().getParameters().get('Id');
        List<Account> accountName= [SELECT Id, Name FROM account WHERE ID = :id];
        
        // Create an email     
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();      
        email.setSubject('Contact Information of ' + accountName[0].Name);     
        String [] toAddresses = new String[] {'abcd@hotmail.com'};     
        email.setToAddresses(toAddresses);      
        email.setPlainTextBody('Please find the following attached pdf.');     
        
        // Create an email attachment     
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();     
        efa.setFileName(accountName[0].Name + '.pdf'); 
    
        // neat - set name of PDF     
        efa.setBody(b); 
    
        //attach the PDF     
        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});     
    
        // send it, ignoring any errors (bad!)     
        Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email}); 
        
        return null; 
    }
    
    
    public PageReference invokeService() {
        Id id = System.currentPageReference().getParameters().get('id');
        result = [SELECT Name FROM Contact WHERE Id=:id].Name;
        //returning null indicates the same page should be returned - in place change
        return null;
    }

    public List<Contact> getMyContacts() {
        Id id= System.currentPageReference().getParameters().get('Id');
        return [SELECT Id, Name, Title, Email, Phone, Fax FROM Contact WHERE AccountID = :id];
    }
}

 
Code:
<apex:page controller="MyController" renderAs="{!if($CurrentPage.parameters.p == null, null, 'pdf')}" tabStyle="Account">
<apex:form>
  <apex:pageBlock title="Contact Information">
  <apex:dataTable value="{!myContacts}" var="aContact" width="100%">
  <apex:column>
  <apex:facet name="header"><b>ID</b></apex:facet>
  {!aContact.id}
  </apex:column>
  
  <apex:column>
  <apex:facet name="header"><b>Name</b></apex:facet>
  {!aContact.Name}
  </apex:column>
 
  <apex:column>
  <apex:facet name="header"><b>Title</b></apex:facet>
  {!aContact.Title}
  </apex:column>
  
  <apex:column>
  <apex:facet name="header"><b>Email</b></apex:facet>
  {!aContact.Email}
  </apex:column>
  
  <apex:column>
  <apex:facet name="header"><b>Phone</b></apex:facet>
  {!aContact.Phone}
  </apex:column>
  
  <apex:column>
  <apex:facet name="header"><b>Fax</b></apex:facet>
  {!aContact.Fax}
  </apex:column>

  </apex:dataTable>
  <apex:commandLink rendered="{!$CurrentPage.parameters.p == null}"  value="PDF" action="{!getDeliverAsPDF}"></apex:commandLink>
  </apex:pageBlock>
  </apex:form>
  
  <apex:detail relatedList="true" />
</apex:page>

 


Message Edited by Fiona Lui on 06-30-2008 03:28 AM

Message Edited by Fiona Lui on 06-30-2008 03:31 AM

Message Edited by Fiona Lui on 06-30-2008 03:34 AM

Message Edited by Fiona Lui on 07-01-2008 06:25 PM