• r1985
  • NEWBIE
  • 125 Points
  • Member since 2008

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 43
    Questions
  • 49
    Replies

I am trying to build a Visualforce page for submitting a new Case for one specific record type. I want the user to bypass picking a Record Type. When they click on a link, it will take them to this visualforce page, and I'd like my picklists in this page to display values compatible with a Record Type. Do I have to create a custom controller to handle the Record Type?

Hi all, 

 

I know that it is possible to pre-populate fields by adding some parameters to the URL.

 

What I need is to retreive the Field ID to be able to pre-populate any field I want knowing the Object name and the field name.

 

Is it possible?

 

How?

 

Thank you in advance.

  • September 02, 2011
  • Like
  • 0

Hi 

Tell me how to find out the month from date.

I have done like this 

  public datetime takemonth;
public PageReference month() 
    {
       
     //  date duedate =  date.today();
       date dueDue = Date.newInstance(takemonth.year(),takemonth.month());
      // integer dueNow = duedate.month(dueDate);
      system.debug('++++++++++++++++++++++++'+ dueDue );
       return dueDue ;
    }

 And i am getting the error

Error: ctrl_sch Compile Error: Method does not exist or incorrect signature: Date.newInstance(Integer, Integer) at line 30 column 22

 

thanks 

Anuraj

  • September 02, 2011
  • Like
  • 0

Hi all,

   i need to write custom error message for unique field not allowing duplicates in vf page. can u give me the sample code.

 

Thanks in advance

anu

  • August 08, 2011
  • Like
  • 0

I have a scheduled job that sends Compliance Notification emails to an Account's key contact. If an invalid email is encountered, the job fails and no emails are sent even to valid addresses. However, when i look at Monitoring Apex jobs under set up, the status is 'Completed' and status detail displays the specific error. Further, on the Account record the Notification Status doesn't change from 'Draft' to 'Sent'.

Hi,

 

I created a dynamic web project in eclipse and used Partner wsdl to generate the client. I am not able to find the setFields,getFields method in sobject. How to get those methods??

 

Thanks,

MVP

  • April 12, 2012
  • Like
  • 0

Hi,

 

Kindly let me know how to get the value of outputField in javascript.

 

Thanks in advance,

MVP

  • February 10, 2012
  • Like
  • 0

Hi,

 

I have a requirement to display list of records from a object in tabular format. Every values will have a checkbox so that user can select a default value. The problem i am facing here is, the user can select only one value as default value. Once the default value is selected, other check boxes need to be unchecked automatically. Kindly let me know how this req can be done since in pageblocktable there is a possiblity of choosing multiple values.

 

Thanks in advance,

MVP

  • February 09, 2012
  • Like
  • 0

Hi,

 

Kindly let me know how to identify whether the attachment in vf page is pdf file or not???

 

Thanks in advance,

MVP

  • February 06, 2012
  • Like
  • 0

Hi,

 

I am working on a visualforce page which will render as a pdf. I have to display the output values with underline. I am using style value text-decoration:underline for outputText tag. But it is not displaying with underline. Kindly let me know how can this required be achieved.

 

 

Thanks,

MVP

  • January 31, 2012
  • Like
  • 0

Hi,

 

We have a requirement to redirect to a lead creation page of mobile app from a vf page.

 

How to get the redirect url of mobile app lead creation page?

 

Kindly help me with this.

 

 

Thanks,

MVP

  • November 12, 2011
  • Like
  • 0

Hi,

 

Kindly help me with adding the horizontal scrollbar for the table of mobile visualforce code shown below.

 

<apex:page controller="AccountSearchControllerMobile"  sidebar="false"

showHeader="false" standardStylesheets="false" setup="false">
 <body bgcolor="#E0E0F0">
  <apex:form >
  <apex:pageMessages />
 
    <apex:pageBlock mode="edit" title="Search Results" >
      <center>
          <apex:commandbutton value="New Search" action="{!back}" />
          </center>
    <br/>
        <apex:pageBlockTable value="{!accounts}" var="account" border="2" align="center" id="results">

            <apex:column headerValue="Account Name" value="{!account.name}"/>
           
           <apex:column headerValue="Shipping Street" value="{!account.ShippingStreet}"/>
         
            <apex:column headerValue="Shipping City" value="{!account.ShippingCity}"/>
       
            <apex:column headerValue="Shipping State" value="{!account.ShippingState}"/>
         
            <apex:column headerValue="Shipping Country" value="{!

account.ShippingCountry}"/>
          
            <apex:column headerValue="Shipping Postal Code" value="{!

account.ShippingPostalCode}"/>
         

            <apex:column headerValue="Owner Name" value="{!account.owner.name}"/>          
        

            <apex:column headerValue="Owner Email" value="{!account.owner.email}"/>
        

            <apex:column headerValue="Ricoh Channel" value="{!

account.Ricoh_Channel__c}"/>
     
        </apex:pageBlockTable>
 

      <apex:panelGrid columns="4">
            <apex:commandLink action="{!first}"

reRender="results">First</apex:commandlink>
            <apex:commandLink action="{!previous}" rendered="{!hasPrevious}"

reRender="results">Previous</apex:commandlink>
            <apex:commandLink action="{!next}" rendered="{!hasNext}"

reRender="results">Next</apex:commandlink>
            <apex:commandLink action="{!last}" reRender="results">Last</apex:commandlink>
   
        </apex:panelGrid>
       
    </apex:pageBlock>
    

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

 

Thanks,

MVP

 

  • November 10, 2011
  • Like
  • 0

Hi,

 

Please let me know the practices i need to follow for developing vf pages for mobile.

 

Thanks,

MVP

  • November 03, 2011
  • Like
  • 0

Hi,

 

I have to write a apex class in Database.com to migrate account object records from Force.com edition to Database.com edition using Rest API.

 

Kindly provide me some sample Rest API apex classes for the above scenario.

 

Thanks in advance,

MVP

  • October 15, 2011
  • Like
  • 0

Hi,

 

Have doubt on invoking external web services using apex.

 

1. First we will generate apex class from the wsdl of external application.

 

But after that how we will proceed with that??

 

kindly let me know the process.

 

If you have any doc regarding this do share it with me.

 

Thanks in advance,

MVP

  • October 07, 2011
  • Like
  • 0

Hi,

 

Kindly let me know how to deploy wsdl files into SFDC instance??

 

Thanks in advance,

MVP

  • October 07, 2011
  • Like
  • 0

Hi,

 

We have developed vf page, overriding the standard New button on Account.

 

In the address information section of vf page, the billing adress and shipping address side by side will be present as in standard acount page.

 

In vf page, when we press tab from billing street, the cursor goes to shipping street.

Is it possible to move the cursor to billing city on tab press. How this vertical tabbing can be acheived in vf page???.

 

Kindly help me in this regard.

 

Thanks,

MVP

  • October 05, 2011
  • Like
  • 0

Hi,

 

Anybody explain me the usage of SforceServiceLocator() class??

 

Thanks,

MVP



  • September 24, 2011
  • Like
  • 0

Hi,

 

Anybody explain me the usage of SforceServiceLocator() class??

 

Thanks,

MVP

  • September 24, 2011
  • Like
  • 0

Hi,

 

Anybody please help me in understanding the following web services code.

 

global class SpecialAccounts {
global class AccountInfo {
WebService String AcctName;
WebService Integer AcctNumber;
}
WebService static Account createAccount(AccountInfo info) {
Account acct = new Account();
acct.Name = info.AcctName;
acct.AccountNumber = String.valueOf(info.AcctNumber);
insert acct;
return acct;
}
WebService static Id [] createAccounts(Account parent,
Account child, Account grandChild) {
insert parent;
child.parentId = parent.Id;
insert child;
grandChild.parentId = child.Id;
insert grandChild;
Id [] results = new Id[3];
results[0] = parent.Id;
results[1] = child.Id;
results[2] = grandChild.Id;
return results;
}
TestMethod static void testAccountCreate() {
AccountInfo info = new AccountInfo();
info.AcctName = 'Manoj Cheenath';
info.AcctNumber = 12345;
Account acct = SpecialAccounts.createAccount(info);
System.assert(acct != null);
}
}

 

Thanks,

MVP

  • September 14, 2011
  • Like
  • 0

Hi,

I have downloaded  force-metadata-jdbc-driver-2.1.jar  and  Download schemaSpy_5.0.0.jar (248.9 KB). 

But i donno what else to download to work in Schemaspy.

Anybody help me with the details of downloading the SchemaSpy??

 

 

Thanks in Advance 

  • August 04, 2011
  • Like
  • 0

Hi,

 

How to convert the below query into string??

 

query=[select count() from Account where createddate>:Date.Today()];

 

 

Thanks in advance,

  • August 02, 2011
  • Like
  • 0

Hi,

 

How to find the count of account records if there are more than 2 lakh records?

 

Thanks,

Malar

  • August 02, 2011
  • Like
  • 0

 mail.setPlainTextBody('------------------------------------------------------------------------------------------------------------
      
       S.No   ***  Object Name   ***  Count Of Records Created Today  ***  Count Of Records Modified Today   *****
      
        1     ***  Account       ***            TotalCount[0]         ***               TotalCount[1]        *****
      
        2     ***  Leads         ***            TotalCount[2]         ***               TotalCount[3]        *****
       
        3     ***  Opportunity   ***            TotalCount[4]         ***               TotalCount[5]        *****
       
        4     ***  Contacts      ***            TotalCount[6]         ***               TotalCount[7]        *****
       
        5     ***  Activities    ***            TotalCount[8]         ***               TotalCount[9]        *****
       
       ------------------------------------------------------------------------------------------------------------- ');
       

How to set the above value as string for sending mail???

  • August 01, 2011
  • Like
  • 0

How to give the below query to a string value??

select ID,Name,Opportunity__c,Account__c,Account__r.Owner.isActive,Account__r.name,Account__r.ownerid,Lease_End_Date__c,Install_Date__c,MiF_Category__c from Equipment__c where ((MiF_Category__c='Lease') or (MiF_Category__c='Own')) and ((not Opportunity__r.name like '%_LeasedEquipment%') or (not Opportunity__r.name like '%_OwnedEquipment%')) and Account__r.Owner.isActive=true

 

 

Thanks in advance,

Malar

  • July 29, 2011
  • Like
  • 0

Hi,

 

Kindly let me know how to get the value of outputField in javascript.

 

Thanks in advance,

MVP

  • February 10, 2012
  • Like
  • 0

Hi,

 

Kindly let me know how to identify whether the attachment in vf page is pdf file or not???

 

Thanks in advance,

MVP

  • February 06, 2012
  • Like
  • 0

Hi,

 

I am working on a visualforce page which will render as a pdf. I have to display the output values with underline. I am using style value text-decoration:underline for outputText tag. But it is not displaying with underline. Kindly let me know how can this required be achieved.

 

 

Thanks,

MVP

  • January 31, 2012
  • Like
  • 0

Hi,

 

I am currently in the process of building a custom ui which allows for mass edit of records from a resultset.

 

I currently have the edit form wrapped in a DataTable and all fields are hard-coded.

 

My question is: Is there a way to setup a way to allow users to select which fields they will be editting?

 

I am not sure if DataTable is the correct approach to this. Everything is working in terms of hard code, but I wanted to know if there is something more dynamic.

 

Ideal situation: User gets a selection criteria (like the old report editting pages were setup, checkbox per field to display) then click next to get to the edit form containing only the fields they selected.

 

 

Thanks,

  • January 30, 2012
  • Like
  • 0

Hello, 

 

Here is the error I receive, 

Error: ContactController Compile Error: Illegal assignment from LIST<Contact> to LIST<Contact> at line 11 column 9

 

Below is the simplified version of my Apex class: 

 

public class ContactController {       

public void getContact() {       

List<Contact> d = [select id, name from Contact where id = :ApexPages.currentPage().getParameters().get('id')];           }      

}

 

I tried casting the query result to (List<Contact>), which gives me the following error:

Error: ContactController Compile Error: Incompatible types since an instance of LIST<Contact> is never an instance of LIST<Contact> at line 4 column 27

 

Thanks for the help! 

  • November 07, 2011
  • Like
  • 0

Can chatter profile image be updated using the API?

  • November 04, 2011
  • Like
  • 0

Hi,

 

I need to pick the values from an xml file and put it into Salesforce fields.How to get the values from xml file?

 

Thanks

 

  • October 08, 2011
  • Like
  • 0

I am trying to build a Visualforce page for submitting a new Case for one specific record type. I want the user to bypass picking a Record Type. When they click on a link, it will take them to this visualforce page, and I'd like my picklists in this page to display values compatible with a Record Type. Do I have to create a custom controller to handle the Record Type?

Hi all, 

 

I know that it is possible to pre-populate fields by adding some parameters to the URL.

 

What I need is to retreive the Field ID to be able to pre-populate any field I want knowing the Object name and the field name.

 

Is it possible?

 

How?

 

Thank you in advance.

  • September 02, 2011
  • Like
  • 0

Hi 

Tell me how to find out the month from date.

I have done like this 

  public datetime takemonth;
public PageReference month() 
    {
       
     //  date duedate =  date.today();
       date dueDue = Date.newInstance(takemonth.year(),takemonth.month());
      // integer dueNow = duedate.month(dueDate);
      system.debug('++++++++++++++++++++++++'+ dueDue );
       return dueDue ;
    }

 And i am getting the error

Error: ctrl_sch Compile Error: Method does not exist or incorrect signature: Date.newInstance(Integer, Integer) at line 30 column 22

 

thanks 

Anuraj

  • September 02, 2011
  • Like
  • 0

Hi,

     How do i check that a particular User is manager or not.

 

  With Regards

Prabhash Mishra

I just woke up to a rude shock of my sandbox refreshed.So far,no user who are System admin admit responsibility.Can the sandbox refresh it self automatically or is there a way i can track the user who refreshed it?

Hi,

 

I have a visualforce page which have apex:tabs included. The apex:tabs are using apex:include to include visualforce pages into it. The issue I have is when I do an action in a page, I want one of the pages which is included in the tab to get refresh. Any ideas on how to do this? Code of the page looks as follows:

 

<apex:page standardController="Object__c" extensions="ObjectCE">
<apex:pageBlock >
    <apex:tabPanel >
        <apex:tab name="tab1" title="Tab1" label="Tab1">
         <apex:include pageName="Page1"/>
        </apex:tab>
        <apex:tab name="tab2" title="Tab2" label="Tab2" >
         <apex:include pageName="Page2"/>  
        </apex:tab>
        <apex:tab name="tab3" title="Tab3" label="Tab3">
            <apex:include pageName="Page3"/>
        </apex:tab>       
    </apex:tabPanel>
</apex:pageBlock>
</apex:page>

 

I will invoke an action in Page2 and I want this to refresh Page3, so when the user activates Tab3 it should have the refreshed values.



 

Hi,

 

How to avoid user from creating duplicate roles ?

 

Regards,

Devendra S

 

 

Hi,

 

I need to integrate twitter with salesforce. As a inintial step I have authorized the twitter login credentials using OAuth . But  i'm clueless of how to proceed furthur. Any suggestions?

 

Hi,

 

I am using custom button (Back) on detail page. I want to give a functionality same as Cancel button.

 

What javascript should i write to achive proper result?

 

Cheers,

Devendra S

Hi all,

   i need to write custom error message for unique field not allowing duplicates in vf page. can u give me the sample code.

 

Thanks in advance

anu

  • August 08, 2011
  • Like
  • 0