• punnoose
  • NEWBIE
  • 0 Points
  • Member since 2012

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

How do i include thse fields(In picture)(Tools,Reporsts) that are there in default accounts page.i have the code for the account tab

         code you have given

 <apex:smileytongue:ageBlockTable value="{!accounts}" var="a">
 <apex:column >
 <apex:facet name="header">
  <apex:smileysurprised:utputLabel value=" {!$ObjectType.Account.Fields.Name.Label}" />
   </apex:facet>
    <apex:smileysurprised:utputLink value="/{!a.id}">{!a.Name}</apex:smileysurprised:utputLink>
     </apex:column>
     code you have given

 

 

How do i include thse fields(In picture)(Tools,Reporsts) that are there in default accounts page.i have the code for the account tab

         code you have given

 <apex:smileytongue:ageBlockTable value="{!accounts}" var="a">
 <apex:column >
 <apex:facet name="header">
  <apex:smileysurprised:utputLabel value=" {!$ObjectType.Account.Fields.Name.Label}" />
   </apex:facet>
    <apex:smileysurprised:utputLink value="/{!a.id}">{!a.Name}</apex:smileysurprised:utputLink>
     </apex:column>
     code you have given

 

i have code to generate default Accounts tab
Now i have 2 problems
1 when i click on comapny it goes to cmpany detail page how do i select the page that is edited by pagelayout
and
How do i display these fields that exist as default in the accounts page(and its links)

Reports
Active Accounts
Accounts with last activity > 30 days
Account Owners
Contact Role Report
Account History Report
Partner Accounts
******************************************
Tools
Import My Accounts & Contacts
Import My Organization's Accounts & Contacts
Mass Delete Accounts
Transfer Accounts
Merge Accounts
Sales Methodologies


**************Code*********************
<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
<apex:pageBlock >
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column >
<apex:facet name="header">
<apex:outputLabel value=" {!$ObjectType.Account.Fields.Name.Label}" />
</apex:facet>
<apex:outputLink value="/{!a.id}" target="_blank">{!a.Name}</apex:outputLink>
</apex:column >
<apex:column value="{!a.name}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
**************Code*********************

i have code to generate default Accounts tab
Now i have 2 problems
1 when i click on comapny it goes to cmpany detail page how do i select the page that is edited by pagelayout
and
How do i display these fields that exist as default in the accounts page(and its links)

Reports
Active Accounts
Accounts with last activity > 30 days
Account Owners
Contact Role Report
Account History Report
Partner Accounts
******************************************
Tools
Import My Accounts & Contacts
Import My Organization's Accounts & Contacts
Mass Delete Accounts
Transfer Accounts
Merge Accounts
Sales Methodologies


**************Code*********************
<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
<apex:pageBlock >
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column >
<apex:facet name="header">
<apex:outputLabel value=" {!$ObjectType.Account.Fields.Name.Label}" />
</apex:facet>
<apex:outputLink value="/{!a.id}" target="_blank">{!a.Name}</apex:outputLink>
</apex:column >
<apex:column value="{!a.name}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
**************Code*********************

 
How do u get the billing city,Phone is working correctly   

*******************************

<apex:pageBlockTable value="{!accounts}" var="a">

<apex:column headerValue="Phone">           
                    <apex:outputText value="{!a.Phone}"/>
                </apex:column>

  <apex:column headerValue="City">           
                    <apex:outputText value="{!a.BillingAddress.BillingCity}"/>
                </apex:column>


**********************************

             

i will tell my problem again ,i create a default accounts Page with th following code. i want this to be linked to on (click of Company name ) to a customized page created by Pagelayout.

How do you do this

Punnoose

i have an application with 4 tabs(each tab has a page attached to it), is it possible to check on load if the user has right previlages from an external webservice.

If the user doesnot have any previlages the application should not load (it should show an Error page)like if the login for salesforce is treated as vilidation.

If it is not there in an external database application should not be loaded. Else all the application needs to be loaded

Regards

Punnoose

i have an application with 4 tabs, is it possible to check on load if the user has right previlages from an external webservice.

If the user doesnot have any previlages the application should not load (it should show an Error page)like if the login for salesforce is treated as vilidation.

If it is not there in an external database application should not be loaded. Else all the application needs to be loaded

Regards

Punnoose

I have created a custom page for account . How do i get the detail of the account like the full description page as we click on the normal companies page in account Page

 

Regards

Punnoose

 

i have a created a page attached to accounts Tab. Here i want to go to deatiled description of companies as in the normal Accounts page(On click of {!a.name} tab).. Where they have deatils of the accounts.

In my same page(Current PAge(Accounts)) i want the these fields like(Reports,Go to Reports ,Tools) fields too as in normal accounts page

<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account"
sidebar="false">
<apex:pageBlock >
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{!a.Annual_Value__c}"/>
<apex:column value="{!a.Phone}"/>

</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

******************My Current Code************************************

I created an application in that i  created a tab"ADMIN" in which i had page called admin,using an external webservice i checked wether that login  has an admin privilages and based on that i diverrt to two diffrent pages "NormalAdmin" and "USer"Pages which i have created in salesforce. But when i load the page The contents are the contents of the "NormalAdmin" and "USer" 

But the the current application which is given in the drop down changes and the tabs changes to the new Application.

Please do help me. Should i insert the three pages when create the tab "ADMIN".Please do help me

Regards

Punnoose

I craeted an appliocation in that i  created a tab"ADMIN" in which i had page called admin,using an external webservice i checked wether that login  has an admin privilages and based on that i diverrt to two diffrent pages "NormalAdmin" and "USer"Pages which i have created in salesforce. But when i load the page The contents are the contents of the "NormalAdmin" and "USer" 

But the the current application which is given in the drop down changes and the tabs changes to the new Application.

Please do help me. Should i insert the three pages when create the tab "ADMIN".Please do help me

Regards

Punnoose

How do i unit test a Json Parser.We have a lot of json parser installed in out appliaction.Please do suggest some ways to install unit testing for  json parser

Regards

Punnoose

I want to create a page simlar to Accounts simlar to "Application in Call Centre" "Account".
I want to make some modifications like in "Recent Account" i want to have a an additional column
(4 th column) what tool should i use.i addition i want to add another button which should go to another
newly created page. So what should i use to create this(Like Visual Source page)

Punnoose

I want to create a page simlar to Accounts simlar to "Application in Call Centre" "Account".
I want to make some modifications like in "Recent Account" i want to have a an additional column
(4 th column) what tool should i use.i addition i want to add another button which should go to another
newly created page. So what should i use to create this(Like Visual Source page)

Regards

Punnoose

How do i take the elements from the Account object that are recently accessed

Regards

punnoose

I have to make an application and i have to publish in Appexchange.

so how do upload a page into Appexchange. Realtively new to appexchange.

Regards

Punnoose

How do you attach  visual force page to application

Regards

Punnoose

Howw do you attach visual source page to application

Regards

Punnoose

 

I have a datatable in page  and all the values are displayed in the table,

now in one column i want to display images based on different values of  a.asset_type

How do i do that??

regards

Punnoose


<apex:dataTable id="hh1" value="{!Assets}" var="a" columnswidth="50px,50px,50px,50px,50px,50px" cellpadding="4" border="1" styleClass="container_tree_csv">
              ........
                 <apex:column headerValue="Asset Type">           
                    <apex:outputText value="{!a.asset_type}"/>
                </apex:column>
            </apex:dataTable>

i will tell my problem again ,i create a default accounts Page with th following code. i want this to be linked to on (click of Company name ) to a customized page created by Pagelayout.

How do you do this

Punnoose

I have created a custom page for account . How do i get the detail of the account like the full description page as we click on the normal companies page in account Page

 

Regards

Punnoose

How to connect to to SQL Server database. What is the procedure
  • July 26, 2012
  • Like
  • 0

How do i unit test a Json Parser.We have a lot of json parser installed in out appliaction.Please do suggest some ways to install unit testing for  json parser

Regards

Punnoose

How do you attach  visual force page to application

Regards

Punnoose

 

I have a datatable in page  and all the values are displayed in the table,

now in one column i want to display images based on different values of  a.asset_type

How do i do that??

regards

Punnoose


<apex:dataTable id="hh1" value="{!Assets}" var="a" columnswidth="50px,50px,50px,50px,50px,50px" cellpadding="4" border="1" styleClass="container_tree_csv">
              ........
                 <apex:column headerValue="Asset Type">           
                    <apex:outputText value="{!a.asset_type}"/>
                </apex:column>
            </apex:dataTable>

i have  a problem when i rerender a part of a page then i am able to get javascript values  that are there in that page.

with that echo function(name) i get the three values

 

When i remove the rerender ,in thecase when i want to redirect to another page after getting the thrre  values in the page from javascript ,iam not getting the values.in that page the function returns the three values correctly.IS there any substitute for rerender in that scenario.

Please do help me

Regards

Punnoose

*******************************CODE**********************************

<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel" status="myStatus">
            <apex:param name="Param1"  value="" />
            <apex:param name="Param2"  value="" />
            <apex:param name="Param3"  value="" />
        </apex:actionFunction>

*******************************CODE**********************************

i have a variable in java script--- include2  i want to take that value into apex code i have written some piece of code found from discussion form but its not working .please tell me why?
  ------------Apex code---------
public string timestampValue{get;set;}
public new2(){
timeStampValue = 'm';
}
public void sendTimestamp()
{
    timestampValue='timestampValue--' + timeStampValue;
//system.debug('timestampValue' + timeStampValue);
}

}
------------Apex code---------
-------------javascript code---------
var include2='';
function showIndustriesId(theId,obj)
{
    if(obj.checked)
    {
        include2=include2.concat((','+theId));
        alert(include2);
    }
    else
    {
        include2=include2.replace((','+theId),'');
        alert(include2);
    }
}
function sendTimeStamp()
{
    var timeStamp=include2;
          sendTimeStamp(timeStamp);
}

-------------javascript code---------
-------------visual force---------
<apex:form >
  <apex:commandButton value="pass" onclick="sendTimeStamp()"/>
          <apex:actionFunction name="sendTimeStamp" action="{!sendTimeStamp}" >
    <apex:param name="x" value="" assignTo="{!timeStampValue}" />
</apex:actionFunction>
    </apex:form>
-------------visual force---------

i am having a class

public class region{
public Integer region_id{get;set;}
public String region_name{get;set;}
public List<Integer> country_id{get;set;}
public list<String> country_name{get;set;}
}

 i have given a list of this class

when i tried to generate tree view withpage code

-------------------------

<apex:page Controller="Tree" showHeader="true" tabStyle="account">
<!-- Include the Jquery Script files -->
<link rel="stylesheet" href="{!URLFOR($Resource.Jtreeview,'/jquery.treeview.css')}"/>
<script src="{!URLFOR($Resource.Jtreeview,'/lib/jquery.js')}" type="text/javascript"></script>
<script src="{!URLFOR($Resource.Jtreeview,'/lib/jquery.cookie.js')}" type="text/javascript"></script>
<script src="{!URLFOR($Resource.Jtreeview,'/jquery.treeview.js')}" type="text/javascript"></script>
<!-- End of Javascript files -->
<script type="text/javascript">
        $(function() {
            $("#tree").treeview({
                collapsed: false,
                animated: "medium",
                control:"#sidetreecontrol",
                persist: "location"
            });
        })
</script><apex:form >
<br/> <br/> <br/>
<!-- Tree -->
<div class="treeheader" style="height:0px;">&nbsp;</div>
<div id="sidetreecontrol"><a href="?#"><font style="color:blue;">Collapse All</font></a> | <a href="?#"><font style="color:blue;">Expand All</font></a></div>
<ul id="tree">
    <apex:repeat value="{!Accounts}" var="parent">
        <li><strong><apex:inputCheckbox id="checkedone3">

</apex:inputCheckbox><apex:outputtext style="color:blue;" escape="false" value="{!parent.region_name}"/></strong>
             <ul>
                 <apex:repeat value="{!parent}" var="child">
                    <li><span class="formattextcon"><apex:inputCheckbox id="checkedone3">

</apex:inputCheckbox><apex:outputtext style="color:green;" escape="false" value="{!child.country_name}"/></span>
                 
                    </li>
                 </apex:repeat>  
             </ul>  
        </li>
    </apex:repeat>
</ul></apex:form>
<!-- End of Tree -->       
</apex:page>

-------------------------------------------------------

 i am getting a tree like this

 

 

  • Africa
    • [Algeria, Angola, Benin, Botswana, Burkina Faso, Burundi, Cameroon, Cape Verde, Central African Republic, Chad, Comoros, Congo (Brazzaville), Democratic Republic of the Congo, Djibouti, Egypt, Equatorial Guinea, Eritrea, Ethiopia, Gabon, Gambia, Ghana, Guinea, Guinea-Bissau, Kenya, Lesotho, Liberia, Libya, Madagascar, Malawi, Mali, Mauritania, Mauritius, Morocco, Mozambique, Namibia, Niger, Nigeria, Réunion, Rwanda, São Tomé and Príncipe, Senegal, Seychelles, Sierra Leone, Somalia, South Africa, St. Helena, Sudan, Swaziland, Tanzania, Togo, Tunisia, Uganda, Western Sahara, Zambia, Zimbabwe]
  • Asia
    • [Afghanistan, Bangladesh, Bhutan, Brunei, Cambodia, China, East Timor, Hong Kong, India, Indonesia, Japan, Kazakhstan, Kyrgyzstan, Laos, Macao, Malaysia, Maldives, Mongolia, Myanmar, Nepal, North Korea, Pakistan, Philippines, Singapore, South Korea, Sri Lanka, Taiwan, Tajikistan, Thailand, Turkmenistan, Uzbekistan, Vietnam]
  • Caribbean
    • [Anguilla, Antigua and Barbuda, Aruba, Bahamas, Barbados, British Virgin Islands, Cayman Islands, Cuba, Dominica, Dominican Republic, Grenada, Guadeloupe, Haiti, Jamaica, Martinique, Montserrat, Netherlands Antilles, St. Kitts and Nevis, St. Lucia, St. Vincent and the Grenadines, Trinidad and Tobago, Turks and Caicos]
  • Central America
    • [Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua, Panama]

 

 

i want in this format

  Central America

         Belize

        Costa rica

        El Salvador

        Guatemala

 what changes should i make to the page code

Regards

Punnoose

 

 

in table i have six fields out of that i have three radio buttons for --Include,exclude,None. In one row only one will be active

Either -Include,exclude,None that is working.How do i get all the IDS which have include -button clicked and exclude--button clicked.At any point of time How do i know which all rows are included and which all rows are excluded.

Here is my code

 

<apex:pageBlock id="allcons">
<apex:pageblocktable id="allcons" value="{!AllAccounts}" var="accsd" rendered="{!NOT(ISNULL(AllAccounts))}">
<apex:column headerValue="File Names">
<apex:outputText value="{!accsd.display_file_names}"/>
</apex:column>
<apex:column headerValue="Company Nos">

<apex:outputText value="{!accsd.display_comp_nos}"/>
</apex:column>

<apex:column headerValue="CSV IDS">
<apex:outputText value="{!accsd.display_csv_ids}"/>
</apex:column>
<!-- Shine -->
<apex:column headerValue="duns">
<apex:outputText value="{!accsd.display_duns}"/>
</apex:column>

<apex:column headervalue="Include">
<apex:actionsupport action="{!selectcon}" event="onclick" rerender="consel,allcons">
<input type="radio" />
<apex:param name="display" value="{!accsd.display_duns}">
</apex:param></apex:actionsupport>
</apex:column>
<apex:column headerValue="Exclude">
<input type="radio" name="{!accsd.display_file_names}" />
</apex:column>

<apex:column headerValue="None">
<input type="radio" name="{!accsd.display_file_names}" />


</apex:column>
<apex:column headerValue="Delete">
<a href="#" onclick="Delete('{!accsd.display_file_names}')" style="color:red;" >X</a>
<apex:param name="delname" value="{!accsd.display_csv_ids}" />
</apex:column>
<!-- Shine -->
</apex:pageblocktable>

</apex:pageBlock>

Thanks in advance

 

 

Shine

 

when i try to parse the string

 

 

with this code

             counter=0;
                while (parser.nextToken() != null && counter<10)
                {
                counter++;
                    if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
                     {
                     
                            // Get the value.
                                parser.nextToken();
                            // Compute the grand total price for all invoices.
                            Temp=parser.getText();
                            file_count=integer.valueof(Temp);
                            if(file_count==0)
                            {
                             file_exists=0;
                            
                             }
                           // csv_ids.add( Temp);
                      }
                }
                counter=0;
                 
my json string is

{"success":true,"total_records":1,"data":[{"file_name":"aaavalid.csv"}]}

 

 

 

 

Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at input location [1,4]
An unexpected error has occurred. Your solution provider has been notified. (system)

How do i resolve this problem

Thanks in advance

punnoose

I  two lists  list a and  list b

i am able to display a table like this

 

Column1   Column2

a,b,c             e,f,h

 

where a,b,c are contents of list a and e,f,h are contents of list b

How do i make it to

Column1   Column2

a                      e

b                        f

c                        h

 

 

This is a long stanging requiement of mine with<ape:columns>

 

Regards

Punnoose

Hai,

 

How its possible to display 3 list in a single table?

 

 

shine

 

How do i traverse through this path(Xml) using apex

/SOAP-ENV:Body/sch:GetCompanyDetailResponse/sch:return/sch:companyId

Thanks in advance

Punnoose

i am having trouble getting connection Hoovers Api, i have given accesss to http://hapi.hoovers.com

In this i am getting exception-------------------  System.HttpResponse[Status=Forbidden, StatusCode=403]

 

Please do respond urgently

 

Heres my code i got it fromlink::::

http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/apex/message-id/77643/print-single-message/true/page/1

 

global with sharing class HttpCallout_CLS{

String Accid = apexPages.currentPage().getParameters().get('id');

Public void sendRequest(){
    String env;
    integer j,k;
    HttpRequest req = new HttpRequest();
    req.setMethod('GET');
    req.setHeader('content-type','text/xml');

    req.setEndpoint('http://hapi.hoovers.com/HooversAPI-32');
    String API_KEY = 'XXXX'; // Use Api Key
    Blob headerValue = Blob.valueOf(API_KEY);
    String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
    req.setHeader('Authorization', authorizationHeader);
    String CName = apexPages.currentPage().getParameters().get('Name');

  

              // **** removing special characters from a account name*****
    
    List<String> spl= New List<String>{'@','#','$','%','^','&','*','(',')','!','.','"','<','>','?'};
    List<String> li = New List<String>();
    String CompName='';
    for(j=0;j<CName.length();j++){
      li.add(CName.substring(j,j+1));
     }
    for(j=0;j<CName.length();j++){
        for(k=0;k<spl.size();k++){
            if(li[j]==spl[k]){
                 li[j]=' ';
                 break;           
            }
        }
    }  
   for(Integer l=0;l<li.size();l++){
       CompName = CompName + li[l];
    }

//constucting request body

 env = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://applications.dnb.com/webservice/schema/">'+
            '<soapenv:Header>'+
              '<sch:API-KEY>xxxx</sch:API-KEY>'+
            '</soapenv:Header>'+
            '<soapenv:Body>'+
              '<sch:FindCompanyByKeywordRequest>'+
              '<sch:maxRecords>100</sch:maxRecords>'+
              '<sch:sortDirection>Ascending</sch:sortDirection>'+
              '<sch:keyword>'+CompName+'</sch:keyword>'+  // search keyword
              '<sch:searchBy>companyName</sch:searchBy>'+
              '<sch:returnSearchNavigation>true</sch:returnSearchNavigation>'+
              '<sch:orderBy>CompanyName</sch:orderBy>'+
              '<sch:searchNavigation>'+
                '<sch:employeeSearchNavigation>'+
                '</sch:employeeSearchNavigation>'+
                '<sch:ownershipTypeSearchNavigation>'+
                '</sch:ownershipTypeSearchNavigation>'+
                '<sch:locationTypeSearchNavigation>'+
                '</sch:locationTypeSearchNavigation>'+
                  '<sch:salesSearchNavigation>'+
                  '</sch:salesSearchNavigation>'+
                  '<sch:industrySearchNavigation>'+
                 '</sch:industrySearchNavigation>'+
                '</sch:searchNavigation>'+
               '</sch:FindCompanyByKeywordRequest>'+
              '</soapenv:Body>'+
             '</soapenv:Envelope>';      

 

     req.setBody(env);  // sending request to the API
    System.debug(req.getBody());     
   Http http = new Http();

   HTTPResponse res = http.send(req);  // getting response from the API

 System.debug(res);

 

 

 

 

Regards

Punnoose