• Apex Code Development
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Dear Folks,

 

I had the below requirement related to CTI integration with Salesforce.com.

 

Dialer/Telephony- I need an intuitive dialer system integrated with the CRM which will allow me to run “Progressive Dialing”  where on a given day a list of customers would be populated into the dialer and then the agent would be able to click to dial each lead one at a time making notes and “dispositioning” along the way.  Administrator would be able to set parameters where the agent would be moved to the next call automatically after a period of inactivity. 

 

Alternatively, the system should allow for “Predictive dialing”  which would support a more rapid outbound calling atmosphere.  The dialer and CRM must be tightly integrated so that all call notes and activity in the dialer will be noted in the CRM under the customer’s account.  THE DIALER MUST BE ABLE TO GENERATE CALLS INTERNALLY UTILIZING THEIR CURRENT PHONE SYSTEM RATHER THAN BOUNCING OFF 3rd  PARTY PHONE SERVERS.

 

Please help me out with your thoughts and suggestions on the above CTI integration requirement.

 

Thanks in advance,

Jagadeesh K.

Dear Folks,

 

Requirement: Whenever a lead gets inserted into Salesforce from website, an email with pdf attachment should be sent.The content of pdf cotains company Logo.

 

I am able to send an email with pdf as an attachment but the company Logo is not getting displayed.

 

I created a static resource for the Logo and I am using that static resource in the Visualforce email template.But I was not successfull in displaying the Logo in pdf.

 

Plesae help me out with a solution ASAP.

 

Thanks in advance,

Jagadeesh K.

Dear Folks,

 

I need to create a Google Doc with multiple sheets based on Opportunity stage. We have integrated the Google Doc API with Sandbox and we were able to create a Google Doc but with only one sheet. My requirement is to create a Doc with multiple sheets.

 

Please suggest me a solution for this ASAP.

 

Thanks in advance.

 

Regards,

Jagadeesh K.

Dear folks,

 

I'm getting a lead from website(using web to lead concept). My client is able to capture the IP address from which the lead is getting.

 

In Salesforce.com, based on the IP address of the lead I need to capture the geographical location from where I got the lead.

 

Thanks & Regards,

Jagadeesh K.

Hello,

 

I went into the web to lead section of Salesforce and generated the code that is attached in two files. I gave this code to a third party vendor/marketing company so that they can put our Salesforce web to lead generated code on their website so that students can go to their website and fill our form. We tested this on 6/27 and it was successful, meaning the company got a message--- automatically generated by Salesforce?---that the test student has successfully submitted the form. A month later, they tested again on 7/27, but this time they got the message below and they feel that it did not go through successfully.

 

They want to be able to know every time the student successfully submits the form so that they can charge us for every student that goes to their site and completes the form.

 

Please help….

 

Thank you

 

Jagadeesh K.

 

 

Post Data:

 

oid=00R70******i&retURL=http%3A%2F%2Fwww.focre.com&lead_source=Web2lead%3A+CSFS+All+Star+Directories&first_name=la+tonya&last_name=moore&00N50000001Ybs4=FA&00N50000001YbsJ=2012&00N5000000290Ro=College+-+Some+Graduate+Work&00N5000000290Ry=Afternoon&email=mlatonya72%40yahoo.com&00N50000001Ybwi=PsyD+in+Forensic+Psychology&street=P.O.+Box+734&city=Inglewood&state=CA&zip=90307&phone=&00N500000026HeG=3236913151

 

Your System’s response:

 

Code: 200 OK

[

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<meta http-equiv="Refresh" content="0; URL=http://www.force.com">

</head>

<script>

var escapedHash = '';

var url = 'http://www.force.com';

if (window.location.hash) {

   escapedHash = '%23' + window.location.hash.slice(1);

}

if (window.location.replace){

window.location.replace(url + escapedHash);

} else {;

window.location.href = url + escapedHash;

}

</script>

</html>

]



Dear folks,

 

My client is using CollegeNet Online Administration Software As A Service(Saas) from which they are getting Lead records as csv files.

 

Is there any way to schedule and run a process which uploads the data in csv file generated from CollegeNet in to Salesforce???

 

Kindly throw some light on this so that I can move forward to achieve this.

 

For more details on CollegeNet,Please find the link below:

http://corp.collegenet.com/WhyChooseUs/aboutCollegenet.html

 

Thanks in advance,

Jagadeesh K.



Hi Folks,

 

I'm creating an event and adding some invitees to the event.When I click on "Save&Update" button,two emails were being sent for each invitee.One is regarding "Meeting Summary" and the other is regarding "Respond To request".But I want only one email alert regarding "Respond To Request".

 

So,kindly help me out in disabling the email alert regarding "Meeting Summary".

 

Thanks in Advance,

Jagadeesh K.







Hi folks!!

 

Out of 25 users in the organization, only 5 users have logged in to the SF instance today.So,when I logged in to the instance and clicked on a user lookup then, only those 5 users should be shown.That is, only the recently logged in users should be visible when we click on user lookup field.

 

Kindly suggest whether this is possible or not and if possible,how this can be done.

 

Thanks in advance!

 

regards,

Jagadeesh K.

Hi folks!!!

 

I've created one object PIF and developed a visualforce page with the standard controller as PIF__c.

 

Basically this PIF form consists of some 40 to 50 fields.Let us suppose there are 3 fields, Company,Phone and Address.

 

I have filled the PIF form and saved the record.The I clicked on Edit and modified Company field from X to Y,

Phone field from 9030236517 to 9654879526,

Address field from Vijayawada to hyderabad.

 

An email should be sent to the record owner or some other person with the below content:

 

Company field has been changed from X to Y

Phone field has been changed from 9030236517 to 9654879526

Address field has been changed from Vijayawada to hyderabad

 

Writing workflows for each and every field is not a best practice I think.

 

Kindly suggest me with a solution ASAP.

 

Thanks in advance.

 

Regards,

Jagadeesh K.

 

 

Hi Folks!!

 

I am facing this error while deploying my Apex code from sandbox to Production:

 

The total size of apex code in this application after removing comments exceeds the maxiumum character size of 2000000

 

That is why I want to delete some unnecessary classes from Production.

 

Kindly suggest me how to delete Apex classes from Production.

 

Thanks in advance,

Jagadeesh K.

Hi Folks!!!

 

I need to retrieve the channel and region parameters from the below URL in IE.

 

https://c.cs4.visual.force.com/apex/BIPL_HighProofProjectionReportExcel_v2?product=[Bacardi Apple, Bacardi Black, Bacardi Gold, Bacardi Limon, Bacardi Orange, Bacardi Razz, Bacardi Reserva, Bacardi Superior]&month=[April, May, June, July, August, September, October, November]&year=FY’11 - FY’12&channel=Civil&region=North-2

 

I used ApexPages.currentPage().getParameters().get('channel') in order to retrieve the chanel parameter from the above URL but I'm getting null value in IE and it is working fine in Mozilla Firefox.

 

Kindly suggest me a solution ASAP.

 

Thanks,

Jagadeesh K.

Hi,

 

I have created a custom button(Content Source is Onclick Javascript) on a standard page layout of my custom object "Sales Order".

 

When I click on this button, I need to capture the Id of the record along with values in that record like name,division,Sales Document Number,Sales Document Type etc....

 

And along with that, when I click on that button a stub of the apex class(Generated by WSDL) needs to be created and a method in that apex class needs to be called.

 

The apex class generated from the WSDL is shown below:

 

//Generated by wsdl2apex

public class biostadtClientMidasBodhtreeCom {
    public class processSalesOrderResponse_element {
        public String return_x;
        private String[] return_x_type_info = new String[]{'return','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://biostadt.client.midas.bodhtree.com','true','true'};
        private String[] field_order_type_info = new String[]{'return_x'};
    }
    public class processSalesOrder_element {
        public String salesDocType;
        public String salesOrg;
        public String distChannel;
        public String division;
        public String partnerRole;
        public String partnerNumber;
        public String purchaseOrdNumber;
        public String itemNumber;
        public String requiredQuantity;
        public String material;
        private String[] salesDocType_type_info = new String[]{'salesDocType','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] salesOrg_type_info = new String[]{'salesOrg','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] distChannel_type_info = new String[]{'distChannel','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] division_type_info = new String[]{'division','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] partnerRole_type_info = new String[]{'partnerRole','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] partnerNumber_type_info = new String[]{'partnerNumber','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] purchaseOrdNumber_type_info = new String[]{'purchaseOrdNumber','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] itemNumber_type_info = new String[]{'itemNumber','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] requiredQuantity_type_info = new String[]{'requiredQuantity','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] material_type_info = new String[]{'material','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://biostadt.client.midas.bodhtree.com','true','true'};
        private String[] field_order_type_info = new String[]{'salesDocType','salesOrg','distChannel','division','partnerRole','partnerNumber','purchaseOrdNumber','itemNumber','requiredQuantity','material'};
    }
    public class SalesOrderClientHttpSoap11Endpoint {
        public String endpoint_x = 'http://220.225.225.13:8080/axis2/services/SalesOrderClient.SalesOrderClientHttpSoap11Endpoint';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://biostadt.client.midas.bodhtree.com', 'biostadtClientMidasBodhtreeCom'};
        public String processSalesOrder(String salesDocType,String salesOrg,String distChannel,String division,String partnerRole,String partnerNumber,String purchaseOrdNumber,String itemNumber,String requiredQuantity,String material) {//This method needs to be called on a button click
            biostadtClientMidasBodhtreeCom.processSalesOrder_element request_x = new biostadtClientMidasBodhtreeCom.processSalesOrder_element();
            biostadtClientMidasBodhtreeCom.processSalesOrderResponse_element response_x;
            request_x.salesDocType = salesDocType;
            request_x.salesOrg = salesOrg;
            request_x.distChannel = distChannel;
            request_x.division = division;
            request_x.partnerRole = partnerRole;
            request_x.partnerNumber = partnerNumber;
            request_x.purchaseOrdNumber = purchaseOrdNumber;
            request_x.itemNumber = itemNumber;
            request_x.requiredQuantity = requiredQuantity;
            request_x.material = material;
            Map<String, biostadtClientMidasBodhtreeCom.processSalesOrderResponse_element> response_map_x = new Map<String, biostadtClientMidasBodhtreeCom.processSalesOrderResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'urn:processSalesOrder',
              'http://biostadt.client.midas.bodhtree.com',
              'processSalesOrder',
              'http://biostadt.client.midas.bodhtree.com',
              'processSalesOrderResponse',
              'biostadtClientMidasBodhtreeCom.processSalesOrderResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.return_x;
        }
    }
}

 

Please find the screenshot below for better understanding:

 

file:///E:/Sales%20Order%20Sample%20Pic.JPG

 

When I click on "Submit" button Sales Order Name(Test1),Division(1),Id of that particular record should be captured ans a stub of the apex class needs to be created and a method in that apex class needs to be called.

 

Since I am new to calling a web service method in salesforce through a custom button, please suggest a javascript code for the button that fullfills this functionality.

 

Thanks & Regards,

Jagadeesh K.

 

 

Hi Folks!

 

I have created a custom object "Sales Order" and a tab for this object.

 

I clicked on the tab and created a new record.So in the view page of this record we will be having a "Submit" button along with "Edit" and "Cancel" buttons.

 

When I click on this "Submit" button, the information(ie., the fields) in that particular record should be appended to the web-service URL.

 

Please let me know how to proceed to achieve this since I am new to web-services in Salesforce.

 

Please note that the entire page is the standard page.

 

Thanks & Regards,

Jagadeesh K.

Hiii Folks....

 

My requirement in Professional Edition is:

 

When I click on "New" button, a visualforce page will be opened in Edit mode.There will be some fields which need to be filled up.

 

Along with these fields there will be a lookup field of  "Email Templates" and an Email ID field.

 

I will select a particular email template from the lookup and enter one email address in Email ID field.

 

When I click on send (or) save button the content in the selected email template should be sent to the entered email address.

 

Step-wise representation of my requirement in order to get more clarity for you:

 

  • Select an email template
  • Enter an email address
  • Click on Save (or) Send button so that email will be sent to the entered email address

 

I would be thankful to you if you suggest a solution for this.

 

Regards,

Jagadeesh K.

Hii Folks!!!!

 

I want to call a javascript function on page load.Based on the Role of the user who logs in,one of the divs should be visible(or Editable) and the remaining divs should be hidden(or UnEditable).

 

I'm providing my code for better understanding.Kindly look at it and I would be very thankful if you suggest a solution for this.

 

<apex:page standardController="Project_Management__c">

    <apex:form >
        <!--ZM-00E90000000cNj8EAE
        Executive-00E90000000cNjDEAU
        Director-00E90000000cNj3EAE-->
        <script src="/soap/ajax/19.0/connection.js" type="text/javascript"></script>
        <script src="/js/functions.js"></script>
        <script src="/soap/ajax/19.0/apex.js" type="text/javascript"></script>


        <script>           
            function GETINFO()
            {
                try{
                    sforce.connection.sessionId="{!$Api.Session_ID}";
                    var user = sforce.connection.getUserInfo();
                    alert('Username:'+user.userName);

                    alert('Role Id:'+user.roleId);
                    if(user.roleId == '00E90000000cNj8EAE'){        
                        
document.getElementById("div3").style.display='block';

                    }

                   if(user.roleId == '00E90000000cNjDEAU'){        
                        
document.getElementById("div4").style.display='block';

                    }

                   if(user.roleId == '00E90000000cNj3EAE'){        
                        
document.getElementById("div5").style.display='block';

                    }

                  }
                  catch(error){
                      alert(error);
                  }         
            }
            window.onLoad=GETINFO();
         </script>
         
 
           <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:inputField value="{!Project_Management__c.Name}"/>
            </apex:pageBlockSection>
           </apex:pageBlock>
          
           <div id="div1" style='float:left;clear:right'>
              <table>            
                <tr><td>Sr.No</td></tr>
                <tr><td>1</td></tr>
                <tr><td>2</td></tr>
                <tr><td>3</td></tr>
              </table>
            </div>


            <div id="div2" style='float:left;clear:right'>
              <table>
                <tr><td>Document Name</td></tr>
                <tr><td>Agreement-Hardware</td></tr>
                <tr><td>Agreement-Software and Service</td></tr>
                <tr><td>Road Permit Declaration</td></tr>
              </table>
            </div>


            <div id="div3" style='float:left;clear:right'>
              <table>
                <tr><td>Attached</td></tr>
                <tr><td><input id="zm1" type="checkbox"/> </td></tr>
                <tr><td><input id="zm2" type="checkbox"/></td> </tr>
                <tr><td><input id="zm3" type="checkbox"/></td> </tr>
              </table>
            </div>


            <div id="div4" style='float:left;clear:right'>
              <table>
                <tr><td>Checked</td></tr>
                <tr><td><input id="mis1" type="checkbox"/></td></tr>
                <tr><td><input id="mis2" type="checkbox"/></td></tr>
                <tr><td><input id="mis3" type="checkbox"/></td></tr>
              </table>
            </div>


            <div id="div5" style='float:left;clear:right'>
              <table>
                <tr><td>Approved</td></tr>
                <tr><td><input id="director1" type="checkbox"/></td></tr>
                <tr><td><input id="director2" type="checkbox"/></td></tr>
                <tr><td><input id="director3" type="checkbox"/></td></tr>
              </table>
            </div>


            <div id="div6" style='float:left;clear:right'>
              <table>
                <tr><td>Received</td></tr>
                <tr><td><input id="finance1" type="checkbox"/></td></tr>
                <tr><td><input id="finance2" type="checkbox"/></td></tr>
                <tr><td><input id="finance3" type="checkbox"/></td></tr>
              </table>           
            </div>
       
    </apex:form>

</apex:page>

 

 

 

Thanks & Regards,

Jagadeesh K.

Hii Folks!!!!

 

I'm working on Professional Edition.I need to retrieve userRoleId of the user who logs in to the system.

I'm getting username,userId,profileId and sessionId correctly through the following code:

var user = sforce.connection.getUserInfo();

alert(user.userName);

alert(user.Id);

alert(user.profileId);

alert(user.sessionId);

 

But could not retrieve "userRoleId".Can anyone suggest me with a solution.

 

Thanks & Regards,

Jagadeesh K.

Hi Folks.....


I used the following Javascript to export my table of data to excel.

 

   <script type="text/javascript">

   function exportToExcel(){

       var oExcel = new ActiveXObject("Excel.Application");

       var oBook = oExcel.Workbooks.Add;

       var oSheet = oBook.Worksheets(1);

       for (var y=0;y<ExportTable.rows.length;y++){

           for (var x=0;x<ExportTable.rows(y).cells.length;x++){

               oSheet.Cells(y+1,x+1) =ExportTable.rows(y).cells(x).innerText;

           }

       }

       oExcel.Visible = true;

       oExcel.UserControl = true;

   }

   </script>


Through this code my requirement is almost reached except one issue.I developed a table using Visualforce in Salesforce.I've added the above javascript in the visualforce code.I was successful in exporting the data to Excel having the tags <apex:inputText> but not <apex:outputText>.

My sample code for
table is provided below for more information:

<table id="ExportTable">
<tr>
  <td width="10%" BGCOLOR="#99CCFF"><center><b>April</b></center> </td>

  <td> <apex:inputText value="{!April1}" disabled="{!Apr1a}"/> </td>
  <td> <apex:inputText value="{!April2}" disabled="{!Apr2a}"/></td>
  <td> <apex:inputText value="{!April3}" disabled="{!Apr3a}"/> </td>
  <td> <apex:outputText value="{0,number,0.00}" id="AprilTotal">  
      <apex:param value="{!AprilTotal}"/>
     </apex:outputText>     
   </td>     
  </tr>   
</table>

I was able to export the "AprilTotal" value in to Excel with the above javascript code but not the values in "April1","April2","April3".

Kindly suggest a solution on how to export the values in <apex:outputText> tags.

Thanks & Regards,
Jagadeesh K.

How to pass values to the show method on MRUHover.getHover({!cc1.Id}.show()...So,that when i move a mouse on to the item it should display some text  on Hover.

 

 

 

<div class="" onblur="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onfocus="MRUHoverDetail.getHover('{!cc1.Id}').show();"
                                       onmouseout="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onmouseover="MRUHoverDetail.getHover('{!cc1.Id}').show();">

Hi Folks,

 

This is the code used for Hovering over a record.

Hovering is getting possible,but we are  unable to show the record details on Hover.we are unable to pass the id of the record on Hovering over a record using onMouseOver() event...

 

Provide me some suggestions how to capture the id and pass it into a fuction in a java script on onMouseOver().

 

 

 

<apex:page controller="DisplayActivities">
    <script src="/soap/ajax/13.0/connection.js"></script>
    <script type="text/javascript">

        function fun(var Id){        
        alert('vamsi');
            
           <!-- var productquery1 = sforce.connection.query("select Custom_ActivityDate__c,Subject from Task where Id=:{!activities.Id}");-->
        }
    </script>
    <apex:pageblock >
        <apex:pageblocktable value="{!activities}" var="b">
            <apex:image url="{!URLFOR($Resource.images, '1.JPG')}" />
        </apex:pageblocktable>
        <apex:pageblocktable value="{!activities1}" var="c">
        </apex:pageblocktable>
        <apex:pageblocksection title="July Tasks">
            <apex:repeat value="{!activities2}" var="cc1">
                <apex:image url="{!URLFOR($Resource.images, '1.JPG')}" width="25" height="38" onMouseOver="fun()"/>
            <!--    <a href="/{!cc1.Id}"><b onmouseover="LookupHoverDetail.getHover('{!cc1.Id}').show();" >{!cc1.Subject}</b></a>&nbsp;&nbsp;&nbsp; -->
                
                
                <div class="" onblur="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onfocus="MRUHoverDetail.getHover('{!cc1.Id}').show();"
                                       onmouseout="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onmouseover="MRUHoverDetail.getHover('{!cc1.Id}').show();">
                    <div class="mruItem" id="mru{!cc1.Id}">
                        <a href="/{!cc1.Id}" class="leadMru" accesskey="1" title="[Alt+1]">
                        <img src="/s.gif" alt="Task"  class="mruIcon" title="Task"/>
                        <span  class="mruText" onMouseOver="fun({!cc1.subject})">{!cc1.subject}</span>
                    </a>
                    </div>
               </div>
                
                
                
                
                <apex:outputfield value="{!cc1.Custom_ActivityDate__c}"/>
            </apex:repeat>
        </apex:pageblocksection>
        <apex:pageblocksection title="July Events">
            <apex:repeat value="{!activities3}" var="cc2">
                <apex:image id="name" url="{!URLFOR($Resource.images, '6.JPG')}" width="25" height="38" alt="July Events"/>
                
                
                <div class="" onblur="MRUHoverDetail.getHover('{!cc2.Id}').hide();"
                                       onfocus="MRUHoverDetail.getHover('{!cc2.Id}').show();"
                                       onmouseout="MRUHoverDetail.getHover('{!cc2.Id}').hide();"
                                       onmouseover="MRUHoverDetail.getHover('{!cc2.Id}').show();">
                    <div class="mruItem" id="mru{!cc2.Id}">
                        <a href="/{!cc2.Id}" class="leadMru" accesskey="1" title="[Alt+1]">
                        <img src="/s.gif" alt="Task"  class="mruIcon" title="Task"/>
                        <span  class="mruText">{!cc2.subject}</span>
                    </a>
                    </div>
               </div>

                
                
                <apex:outputField value="{!cc2.Custom_ActivityDate__c}"/>
                            &nbsp;&nbsp;&nbsp;
            </apex:repeat>
            <br/>
        </apex:pageblocksection>
    </apex:pageblock>
</apex:page>

 

 

Regards,

Jagadeesh K

 

 

 

 

 

Hi folks,

In the opportunity related list,I had a button "New Contract".When the opportunity stage equals "Contract Initiated" the "New Contract" button should be visible on the Opportunity related list otherwise it should be hidden.Please suggest a solution for this.

 

Thanks & Regards,

Jagadeesh K.

Dear folks,

 

I'm getting a lead from website(using web to lead concept). My client is able to capture the IP address from which the lead is getting.

 

In Salesforce.com, based on the IP address of the lead I need to capture the geographical location from where I got the lead.

 

Thanks & Regards,

Jagadeesh K.

Dear folks,

 

My client is using CollegeNet Online Administration Software As A Service(Saas) from which they are getting Lead records as csv files.

 

Is there any way to schedule and run a process which uploads the data in csv file generated from CollegeNet in to Salesforce???

 

Kindly throw some light on this so that I can move forward to achieve this.

 

For more details on CollegeNet,Please find the link below:

http://corp.collegenet.com/WhyChooseUs/aboutCollegenet.html

 

Thanks in advance,

Jagadeesh K.

Hi Folks!!!

 

I need to retrieve the channel and region parameters from the below URL in IE.

 

https://c.cs4.visual.force.com/apex/BIPL_HighProofProjectionReportExcel_v2?product=[Bacardi Apple, Bacardi Black, Bacardi Gold, Bacardi Limon, Bacardi Orange, Bacardi Razz, Bacardi Reserva, Bacardi Superior]&month=[April, May, June, July, August, September, October, November]&year=FY’11 - FY’12&channel=Civil&region=North-2

 

I used ApexPages.currentPage().getParameters().get('channel') in order to retrieve the chanel parameter from the above URL but I'm getting null value in IE and it is working fine in Mozilla Firefox.

 

Kindly suggest me a solution ASAP.

 

Thanks,

Jagadeesh K.

Hii Folks!!!!

 

I want to call a javascript function on page load.Based on the Role of the user who logs in,one of the divs should be visible(or Editable) and the remaining divs should be hidden(or UnEditable).

 

I'm providing my code for better understanding.Kindly look at it and I would be very thankful if you suggest a solution for this.

 

<apex:page standardController="Project_Management__c">

    <apex:form >
        <!--ZM-00E90000000cNj8EAE
        Executive-00E90000000cNjDEAU
        Director-00E90000000cNj3EAE-->
        <script src="/soap/ajax/19.0/connection.js" type="text/javascript"></script>
        <script src="/js/functions.js"></script>
        <script src="/soap/ajax/19.0/apex.js" type="text/javascript"></script>


        <script>           
            function GETINFO()
            {
                try{
                    sforce.connection.sessionId="{!$Api.Session_ID}";
                    var user = sforce.connection.getUserInfo();
                    alert('Username:'+user.userName);

                    alert('Role Id:'+user.roleId);
                    if(user.roleId == '00E90000000cNj8EAE'){        
                        
document.getElementById("div3").style.display='block';

                    }

                   if(user.roleId == '00E90000000cNjDEAU'){        
                        
document.getElementById("div4").style.display='block';

                    }

                   if(user.roleId == '00E90000000cNj3EAE'){        
                        
document.getElementById("div5").style.display='block';

                    }

                  }
                  catch(error){
                      alert(error);
                  }         
            }
            window.onLoad=GETINFO();
         </script>
         
 
           <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:inputField value="{!Project_Management__c.Name}"/>
            </apex:pageBlockSection>
           </apex:pageBlock>
          
           <div id="div1" style='float:left;clear:right'>
              <table>            
                <tr><td>Sr.No</td></tr>
                <tr><td>1</td></tr>
                <tr><td>2</td></tr>
                <tr><td>3</td></tr>
              </table>
            </div>


            <div id="div2" style='float:left;clear:right'>
              <table>
                <tr><td>Document Name</td></tr>
                <tr><td>Agreement-Hardware</td></tr>
                <tr><td>Agreement-Software and Service</td></tr>
                <tr><td>Road Permit Declaration</td></tr>
              </table>
            </div>


            <div id="div3" style='float:left;clear:right'>
              <table>
                <tr><td>Attached</td></tr>
                <tr><td><input id="zm1" type="checkbox"/> </td></tr>
                <tr><td><input id="zm2" type="checkbox"/></td> </tr>
                <tr><td><input id="zm3" type="checkbox"/></td> </tr>
              </table>
            </div>


            <div id="div4" style='float:left;clear:right'>
              <table>
                <tr><td>Checked</td></tr>
                <tr><td><input id="mis1" type="checkbox"/></td></tr>
                <tr><td><input id="mis2" type="checkbox"/></td></tr>
                <tr><td><input id="mis3" type="checkbox"/></td></tr>
              </table>
            </div>


            <div id="div5" style='float:left;clear:right'>
              <table>
                <tr><td>Approved</td></tr>
                <tr><td><input id="director1" type="checkbox"/></td></tr>
                <tr><td><input id="director2" type="checkbox"/></td></tr>
                <tr><td><input id="director3" type="checkbox"/></td></tr>
              </table>
            </div>


            <div id="div6" style='float:left;clear:right'>
              <table>
                <tr><td>Received</td></tr>
                <tr><td><input id="finance1" type="checkbox"/></td></tr>
                <tr><td><input id="finance2" type="checkbox"/></td></tr>
                <tr><td><input id="finance3" type="checkbox"/></td></tr>
              </table>           
            </div>
       
    </apex:form>

</apex:page>

 

 

 

Thanks & Regards,

Jagadeesh K.

Hii Folks!!!!

 

I'm working on Professional Edition.I need to retrieve userRoleId of the user who logs in to the system.

I'm getting username,userId,profileId and sessionId correctly through the following code:

var user = sforce.connection.getUserInfo();

alert(user.userName);

alert(user.Id);

alert(user.profileId);

alert(user.sessionId);

 

But could not retrieve "userRoleId".Can anyone suggest me with a solution.

 

Thanks & Regards,

Jagadeesh K.

How to pass values to the show method on MRUHover.getHover({!cc1.Id}.show()...So,that when i move a mouse on to the item it should display some text  on Hover.

 

 

 

<div class="" onblur="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onfocus="MRUHoverDetail.getHover('{!cc1.Id}').show();"
                                       onmouseout="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onmouseover="MRUHoverDetail.getHover('{!cc1.Id}').show();">

Hi,

 

I have made a visualforce page which displays a table of data. I have also put some filters there for which the number of rows of the data in the visualforce page varies.

 

Now I want a mechanism in place by which I can export the data showing at a partcular moment can be exported to a excel sheet/csv with column headers which can be saved locally.

 

a help and a guideline will be much appreciated.

 

cheers

 

Praz

  • May 13, 2010
  • Like
  • 0

I have found multiple posts on how to edit the apex:page line so that when the VF page is activated, it saves itself to an excel file:

 

<apex:page cache="true" contentType="application/vnd.ms-excel#test.xls" controller="StoreController" language="english">

 

But what I need to do is display the VF page with the panelGrid.  Then the user can click a button or link that will export the grid to excel.

 

I was thinking of just creating a second visualforce page that contains the above apex:page line, but I don't know how to add that logic to a button/link.

 

Thanks

 

Todd 

I'm just thinking this one out loud right now.

I was wondering if on my Visual Force page that I have created with custom objects and my desired custom layout. A Hover Detail style interface much like what salesforce uses in the sidebar for recent items when 'hover detail is enabled'.

Any points in the right direction would also be very much appreciated.

So basically I have a visual force page with all of my PageBlockTables... listing information I want in the layout that I'd like... now on some of those records I'd like to hover over the 'name' or the 'id' and trigger a "hover detail" style popup that will show some extra details that I can also choose to view / edit


Any thoughts?