• Sushupsi
  • NEWBIE
  • 180 Points
  • Member since 2009
  • Salesforce Consultant
  • WestSpark Inc


  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 16
    Replies

Hi All,

 

I have been trying to upsert Owner Id field on a custom object using SOAP UI. Facing some issue. Hope will find some advise here.... As always :D

 

I have tried upserting the data for Account Object via SOAP UI as follows:

 

      <urn:upsert>
         <urn:externalIDFieldName>Lonza_ID__c</urn:externalIDFieldName>
         <urn:sObjects xsi:type="Account">
            <Lonza_ID__c>sysadmin</Lonza_ID__c>
            <AccountNumber>6565</AccountNumber>
            <name>Str 3</name>
            <parent>
                <lonza_ID__c>0006-WAFR</lonza_ID__c>
            </parent>
            <Owner>
                <External_ID__c>sush</External_ID__c>
            </Owner>
            <Account_Group__c>Str</Account_Group__c>
            <Address_Number__c>Str 14</Address_Number__c>
         </urn:sObjects>
      </urn:upsert>

 

This did work and the Owner field got updated with user whose External  ID on user recrods matched the Value.

 

Where as when i am trying to do the same operation on the Custom object as follows i encountered an error :(

 

      <urn:upsert>
         <urn:externalIDFieldName>YTD_Summary_External_ID__c</urn:externalIDFieldName>
         <urn:sObjects xsi:type="Account_YTD_Summary__c">
            <YTD_Summary_External_ID__c>12343</YTD_Summary_External_ID__c>
            <Owner>
               <External_ID__c>sush</External_ID__c>
            </Owner>
         </urn:sObjects>
      </urn:upsert>

 

Issue :

 

      <soapenv:Fault>
         <faultcode>sf:INVALID_TYPE</faultcode>
         <faultstring>INVALID_TYPE: Must send a concrete entity type.</faultstring>
         <detail>
            <sf:InvalidSObjectFault xsi:type="sf:InvalidSObjectFault">
               <sf:exceptionCode>INVALID_TYPE</sf:exceptionCode>
               <sf:exceptionMessage>Must send a concrete entity type.</sf:exceptionMessage>
               <sf:row>-1</sf:row>
               <sf:column>-1</sf:column>
            </sf:InvalidSObjectFault>
         </detail>
      </soapenv:Fault>

The Data Type for the Field Owner on Account was "Complex", but then on the custom object mentioned above it is "Name". The custom object has look up relation to Account.

 

Please let me know which way to approach.

 

TIA.

 

- Sushupsi

Hi All,

 

I have recently been doing a requirement with google visualizations. I was successfully get the charts to work for me by plotting the values, but need some help with how the conversion rates would be visible.

 

The Scenario is as below:

 

We have a Corporate Currency - or organization default currency.

 

We have a user default currency on the user Record

 

We have a default currency for every record when Currency feature is enabled in our organization, which is the corporate currency. You may change this value while loading data in bulk or creating via UI.

 

Having said that when a user has data in the USD currency for instance and his personal currency is CHF (swiss franks), when veviews the records we would be able to see USD value as well as in brackets the converted CHF.

 

ex: 1234.45 USD (3673.CHF) ----> This is just an example to show how data is viewed on the detailed page.

 

But in my graph i am able to see it as 1234.45 and no converted values.

 

If someone has worked on this please let me know.

 

TIA.

 

Warm Regards,

Sushupsi

 

Hi All,

 

I have been using the google visualizations to show some data realted to account. I have an object which looks like this:

 Field Name    Field Type

Account          Look up to Account

Type    Actual, Budget or Forecast

UOM/Currency           Identify UOM or Currency

Year    Number

Jan       Number

Feb      Number

March  Number

April    Number

May     Number

June     Number

July      Number

Aug     Number

Sept     Number

Oct      Number

Nov     Number

Dec      Number

 Records exist for various years with data for months and a Type. Based on the Type i need to pick the values of the months and show a graph like this:

 

Values on Y axis and Months on X-axis.

 

 

I am struggling with the VisualForce lineChart Component from the Code Share Project. i am not able to understand how can i associate multiple chart data into a JaSON object. Please advice.

 

 @BobBuzzard - please can you help me with the same.

 

 

Hi All,

 

Please help me design a solution for the following problem:

 

We require to build a custom follow functionality. When we create a record (of any object) in salesforce, we would like to have an option to choose a user or a group of users and mark them to follow the record that is created.

 

We would want to have a custom button on the detailed page of the Record and on click of the button get an option to choose the users whom i want to follow the current record.

 

Please help us with the same. This is very intresting to take up as a challenge.

 

TIA

 

- Sushupsi

Hi All,

 

Long time no see. :smileywink:

 

I have a query regarding the way the Opportunity Products work. Could any one help me understand how the following can be achieved:

 

1.) Navigate to the Detailed Page of an opportunity.

2.) Move to the Related list of Opportunity Products.

3.) Click on "New", to create new opportunity products. The Page is redirected to a Edit page of Selecting a Product.

4.) Once the product is selected and "Select" Button is clicked on the Intermediate page it directs to the Product Creation page.

5.) Here once The "Save" button is clicked the page re-directs to Opportunity Detailed Page.

 

I need to customize the Step 4 and 5 as below:

 

1.) Can we add custom buttons with custom functionality to the Intermediate Page layout of the Opportunity Products?

2.) On saving the "Opportunity Products" record, i need to redirect to any desired page but not the Detailed Page of the Opportunity.

 

Can the Functionality be built like in case of custom Lead Convert functionality?

 

Any pointers would be appreciated.

 

TIA.

 

-Sushupsi

Hi,

 

Long Time no see :smileyhappy:

 

I am here with an issue. We tried forming a work around but seem to not figure it the right way. :smileysad:

 

Please find the scenario below:

 

We require to have a parent window. From the parent window we pass a value of acount to another child window.

Depending on the account id passed to child window we query all the contacts associated to the parent account and show then on the child window.

 

Now i select a multiple contacts from the child window and and i need to pass the contacts to parent window. This is where we am failing.

 

My queries are as follows:

 

1.)    How do we use the same session between the parent and child with out losing the data.

2.)    How can we restrict that the controller does not run the constructor when the child window is opened. I have observed that the constructor runs again when the child window opens with the same controller.

 

I have used the following code for the parent page:

 

<apex:page standardController="IB_CCP_Call_Report__c" tabStyle="IB_CCP_Call_Report__c" extensions="IB_CCP_CallReport_NewController">
<apex:stylesheet value="{!$Resource.IB_CCP_CallReportNewStyles}"/>

------ My code here

     <apex:outputpanel id="refreshOnModalClose" layout="block">
   
        <table width="100%"><tr>
          <td style="width:100%">
          <apex:commandButton value="refresh table" reRender="ExtSection"/>
          <apex:pageBlockSection id="ExtSection" title="Client Attendees" columns="1" collapsible="true">
          <apex:outputPanel id="searchExt" layout="block">
          <center>
             <apex:commandLink target="_blank" action="{!openAddAttendeeWindow}">
                 <apex:commandButton id="addClient" immediate="true" rerender="ExtSection" value="Add Client Attendees" disabled="{!renderAddAttendee}"/>&nbsp;&nbsp;&nbsp;
             </apex:commandLink>
             <!-- action="{!refreshContactList}"-->
             <apex:commandButton id="openClientAttendeesModal" action="{!removeAllContactsFromMap}" value="Clear All" disabled="{!NOT(addedcontactListcheck)}" rerender="searchExt,out2,errors" status="openClientAttendeesModal"/>&nbsp;&nbsp;&nbsp;
             <apex:CommandButton reRender="false" onclick="window.open('/003/e?+{!newContactParam}');" value="New contact"></apex:CommandButton>
          </center><br/>
          <apex:outputpanel id="addedcontactListPanel" rendered="{!addedcontactListcheck}" layout="block">
          <table style="width:100%" border="1"><tr><td style="width:100%">
              <apex:pageBlockTable id="addedcontactListId" value="{!addedcontactListDisplay}" var="addedCon">
              <apex:column HeaderValue="Contact">{!addedCon.ContactName}&nbsp;</apex:column>
              <apex:column HeaderValue="Title">{!addedCon.Title}&nbsp;</apex:column>
              <apex:column HeaderValue="Position">{!addedCon.Position}&nbsp;</apex:column>
              <apex:column HeaderValue="Action"><apex:commandbutton action="{!removeContactFromMap}" value="Delete" reRender="ExtSection">
              <apex:param name="testparam" assignTo="{!deleteContactId}" value="{!addedCon.ContactId}"/>
              </apex:commandbutton>
              </apex:column>
              </apex:pageBlockTable>
          <apex:commandLink action="{!prevConDetail}" value="Previous" rerender="addedcontactListPanel" rendered="{!prevConDetailListCheck}"/>&nbsp;&nbsp;
          <apex:commandLink action="{!nextConDetail}" value="Next" rerender="addedcontactListPanel" rendered="{!nextConDetailListCheck}"/>          
          </td></tr></table>
          </apex:outputpanel>
          </apex:outputPanel>


</apex:page>

 

The Code highlighted in Red is used to open the child window and use the same controller for the same.

 

Here i am able to pass the data from the parent window but i am unable to hold the values and pass them back to the parent window. On refresh the page is just reloading and showing the entire list as empty.

 

    /* This is the Logic for the Call Report Addition of Clients Revamped */
    Public Boolean renderAddAttendee {get; set;}

    Public PageReference openAddAttendeeWindow(){
        return(new pageReference('/apex/IB_CCP_openAddAttendee'));
    }

 

Any help would be appreciated.

 

TIA

Hi All,

 

Long time no see.. :smileywink:

 

This time im back with one more query of mine which is holding me back. :smileysad:

 

I have been trying to host a modal window designed using CSS, and i have written a Search query in the code. When i click the Search button for the first time it doesnt throw and error, once i try to resue the search functionality, it throws the Error : An internal server error has occurred :smileysad:

  

My Code is as below :

 

<!--Start Div tag for company-->
<div id="modalPageCompany">
<div class="modalBackground">
</div> <!--end of modal background-->
<div class="modalContainer">
<div class="modal">
<div class="modalTop"><div align="left"><b>Company Search</b></div><apex:commandbutton action="{!clearcompanylist}" value="Cancel" oncomplete="hideModal('modalPageCompany')"/>
</div>
<div class="modalBody">
<apex:pageBlock >
<table>
<tr><td width="20%" align="right"><apex:outputlabel value="Name: "/></td><td  width="30%"><apex:inputtext value="{!CompanyNameSearch}" id="CompanyNameSearch"/></td></tr>
<tr><td colspan="2" align="center" style="width:100%;"><apex:commandButton value="Search" action="{!searchCompany}"  reRender="clearcompanybutton,companysearchdisplay,CompanyAddButton,NoComprecord,selectcompanytext"/>
<apex:commandButton id="clearcompanybutton" value="Clear" action="{! clearcompanylist}"  reRender="clearcompanybutton,companysearchdisplay,CompanyNameSearch,NoComprecord,selectcompanytext" disabled="{! companyclearbuttondisplay}"/>
</td></tr>
</table>  
</apex:pageblock>
<apex:pageblock id="companysearchdisplay" >
<apex:commandLink id="selectcompanytext" action="{!selectAllCompany}" value="{! SelectallCompany}" rerender="companysearchdisplay,companysearchtable,selectcompanytext" rendered="{! companyListDisplay}"/>
<center> <apex:commandButton id="CompanyAddButton" value="Add" action="{!addcompanies}"  onclick="IsChecked3('modalPageCompany')" rerender="companiesblock,addedcompaniesdatatable,companycountlabelid" /></center>
<center>
<apex:outputlabel id="NoComprecord" value="No Records Found" rendered="{! Nocomprecfound}"/>
</center>
<center>
<apex:commandLink action="{!prevCompanySearch}" value="Previous"  rerender="companysearchdisplay" rendered="{!prevCompSearchListCheck}"/>&nbsp;&nbsp;
<apex:commandLink action="{!nextCompanySearch}" value="Next"  rerender="companysearchdisplay" rendered="{!nextCompSearchListCheck}"/>          
</center>    
<apex:pageBlocktable id="companysearchtable" value="{!companySearchListdisplay}"  var="CSL" rendered="{!companyListDisplay}">
<apex:column headervalue="Add"><apex:inputcheckbox value="{!CSL.addCompany}" onclick="disp3(this)">
<apex:actionSupport event="onclick" action="{!enablecompadd}"  reRender="companysearchdisplay"/>    
</apex:inputcheckbox></apex:column>
<apex:column headerValue="Company Name" value="{!CSL.CompanyName}"/>
</apex:pageBlocktable>
<center>
<apex:commandLink action="{!prevCompanySearch}" value="Previous"  rerender="companysearchdisplay" rendered="{!prevCompSearchListCheck}"/>&nbsp;&nbsp;
<apex:commandLink action="{!nextCompanySearch}" value="Next"  rerender="companysearchdisplay" rendered="{!nextCompSearchListCheck}"/>          
</center>  
<apex:inputhidden id="hid3"/>
</apex:pageBlock>                         
</div> <!--end of modal body-->

</div><!--end of modal--> </div><!--end of modal container--> </div> <!-- end of modalcompany div--> <!--End Div tag for company-->

 

    //procedures for companies
    public void clearcompanylist()
    {
        companyaddbuttondisplay =true; 
        companyclearbuttondisplay =true;
        companyListDisplay =false;
        CompanyNameSearch =''; 
        Nocomprecfound =false;
        if (companySearchList.size() >0)
            companySearchList.clear();
        prevCompSearchListCheck= false; 
        nextCompSearchListCheck= false; 
        SelectallCompany=''; 
    }
    public void searchCompany()
    {
        companySearchListDisplay = new List<searchCompanies>();
        companySearchList = new list<searchCompanies>();
        companySearchListDisplay.clear();
        companySearchList.clear();
        Nocomprecfound=false;
        // to clear the search list before every search
        if (companySearchListdisplay.size() >0) // to be deleted for pagenation
            companySearchListdisplay.clear();
        
        if (companySearchList.size() >0)
            companySearchList.clear();
        
        if(CompanyNameSearch!=null)
            CompanyNameSearch ='\'%'+CompanyNameSearch+'%\'';
        else
           CompanyNameSearch ='\'%%\'';
        try
        {
            String querystring = 'select id, name from account where Inactive__c=false and name like '+CompanyNameSearch+' limit 100' ;
            String excludedid='';
            if (compsearhexcludeidmap.size() >0)
            {
                for (id compid: compsearhexcludeidmap.keyset())
                    excludedid= excludedid+ '\''+ compsearhexcludeidmap.get(compid).companyid+ '\''+',';
                excludedid =excludedid.substring(0,excludedid.length()-1);    
                querystring= querystring + ' and id not in ('+  excludedid + ')';
            }
            system.debug('the string is ' +querystring );
            List <account> company = database.query(querystring);
            companyclearbuttondisplay =false;
            if (company.size()>0)
            {
                system.debug(company);
                searchCompanies searchcomp;
                for (account a: company)
                {
                    searchcomp = new searchCompanies();
                    searchcomp.companyId = a.Id + '';
                    searchcomp.addcompany = false;
                    searchcomp.companyName =a.name;
                    searchcomp.initiallypresent =false;
                    companySearchList.add(searchcomp);
                    //companySearchListdisplay.add(searchcomp);// to be changed when pagenation implemented
  
                }
                companyListDisplay =true;
                SelectallCompany='Select All';
                nextCompSearchList =0; // to be changed when pagenation implemented           
                nextCompanySearch();// to be changed when pagenation implemented
            }    
            else
                Nocomprecfound=true;//the search returned nothing.
        }
        catch(SearchException se)
        {
            CompanyNameSearch ='Encountered exception. please correct it again thats it';
            system.debug('encountered error. Error is: '+se);
            ApexPages.addMessages(se);
        }           
    }
    
    public void addcompanies()
    {
//        addedcompanyList.clear();
        for(searchCompanies sc :companySearchList)
            if(sc.addCompany==True)
            {
                addedcompanyList.add(sc);
                compsearhexcludeidmap.put(sc.companyid,sc);
            }    
        system.debug('the list of companies to be added '+addedcompanyList); 
        addedcompanyblockdisplay =(addedcompanyList.size() >0)? true:false;
        companycount = addedcompanyList.size();
        nextCompAddedList =0;
        nextAddedCompany();
    }
    
    public void removeCompany()
    {
        system.debug('remove id = '+ deletecompanyId);
        if (compsearhexcludeidmap.get(deletecompanyId)!=null)
        {
            if(compsearhexcludeidmap.get(deletecompanyId).initiallypresent ==true)
               deletecompfromgroupobj.add(compsearhexcludeidmap.get(deletecompanyId).recordId);
            
            compsearhexcludeidmap.remove(deletecompanyId);         
            addedcompanyList.clear();
            for(id compid:compsearhexcludeidmap.keyset())
                addedcompanyList.add(compsearhexcludeidmap.get(compid));
            companycount = addedcompanyList.size();
            addedcompanyblockdisplay =(addedcompanyList.size() >0)? true:false;       
            nextCompAddedList =0;
            nextAddedCompany();
        }
        system.debug('the list of companies to be deleted are '+deletecompfromgroupobj);        
        system.debug('to be shown are '+addedcompanyList);    
    }
    public void selectAllCompany()
    {
        if(selectAllCompanyCheck==True)
        {
            selectAllCompanyCheck=false;
            SelectallCompany ='Select All';
            companyaddbuttondisplay =true;
        }    
        else
        {
            selectAllCompanyCheck=True;
            SelectallCompany ='Deselect All';
            companyaddbuttondisplay =false;
        }
        for(Integer loopCounter=0;loopCounter<companySearchListdisplay.size();loopCounter++)
            companySearchListdisplay[loopCounter].addcompany=selectAllCompanyCheck;
    }
    public void prevCompanySearch()
    {
        companySearchListdisplay.clear();            
        Integer limit1 = 0; 
        nextCompSearchListCheck=True;                
        if((nextCompSearchList - (CompSearchCount+CompSearchCount)) > 0)
        {                    
            limit1 = nextCompSearchList -CompSearchCount;
            prevCompSearchListCheck= True; 
        }                   
        else                
        {                    
            limit1 = nextCompSearchList -CompSearchCount ;
            prevCompSearchListCheck= false;                
        }                                    
        for(Integer i=nextCompSearchList - (CompSearchCount+CompSearchCount); i<limit1; i++)                  
            companySearchListdisplay.add(CompanySearchList[i]);             
        nextCompSearchList -=CompSearchCount;
        enablecompadd();
    }
    public void nextCompanySearch()
    {
        companySearchListdisplay.clear();
        integer limit1=0;
        if(nextCompSearchList +CompSearchCount < CompanySearchList.size()) 
        {                   
            limit1 = nextCompSearchList +CompSearchCount ; 
            nextCompSearchListCheck=True;
        }               
        else                
        {                    
            limit1 = CompanySearchList.size();                    
            nextCompSearchListCheck= false;                
        } 
        if(nextCompSearchList >0)
            prevCompSearchListCheck=True;
        else
            prevCompSearchListCheck=False;
                                           
        for(Integer i=nextCompSearchList; i<limit1; i++)                  
            companySearchListdisplay.add(CompanySearchList[i]);
        nextCompSearchList +=CompSearchCount;
        enablecompadd();       
    } 
    public void prevAddedCompany()
    {
        addedcompanyListdisplay.clear();            
        Integer limit1 = 0; 
        nextCompAddedListCheck=True;                
        if((nextCompAddedList- (CompAddedCount+CompAddedCount)) > 0)
        {                    
            limit1 = nextCompAddedList -CompAddedCount;
            prevCompaddedListCheck= True; 
        }                   
        else                
        {                    
            limit1 = nextCompAddedList -CompAddedCount;
            prevCompaddedListCheck= false;                
        }                                    
        for(Integer i=nextCompAddedList- (CompAddedCount+CompAddedCount); i<limit1; i++)                  
            addedcompanyListdisplay.add(addedCompanyList[i]);             
        nextCompAddedList -=CompAddedCount;
        
    }
   
    public void nextAddedCompany()
    {
        addedcompanyListdisplay.clear();
        integer limit1=0;
        if(nextCompAddedList +CompAddedCount< addedCompanyList.size()) 
        {                   
            limit1 = nextCompAddedList +CompAddedCount; 
            nextCompAddedListCheck=True;
        }               
        else                
        {                    
            limit1 = addedCompanyList.size();                    
            nextCompAddedListCheck= false;                
        } 
        if(nextCompAddedList >0)
            prevCompaddedListCheck=True;
        else
            prevCompaddedListCheck=False;
                                           
        for(Integer i=nextCompAddedList ; i<limit1; i++)                  
            addedcompanyListdisplay.add(addedCompanyList[i]);
        nextCompAddedList +=CompAddedCount;       
    }
    public void removeallCompanies()
    {
        for(id compid:compsearhexcludeidmap.keyset())
            if(compsearhexcludeidmap.get(compid).initiallypresent ==true)
                deletecompfromgroupobj.add(compsearhexcludeidmap.get(compid).recordId);
        compsearhexcludeidmap.clear();
        addedcompanyList.clear();
        companycount = addedcompanyList.size();
        addedcompanyblockdisplay =(addedcompanyList.size() >0)? true:false;  
        nextCompAddedList =0;
        nextAddedCompany();
     
    }
    public void enablecompadd()
    {
        integer i=0;
        for(Integer loopCounter=0;loopCounter<companySearchList.size();loopCounter++)
            if (companySearchList[loopCounter].addcompany==true)
            {
                i=1;
                break;
            }
            if (i==1)
                companyaddbuttondisplay =false;
            else
                companyaddbuttondisplay =true; 
    }

 The Class is as above,  the code marked in Red is the code which throws the error.

Please help me with the same. :smileysad:

 

- TIA

 

Sushupsi.

<style>
#modalPageContact
{
    display: none;
    position: absolute;
    width: 100%;
    height: 80%;
    top: 0px; left: 0px;
}
#modalPageEmp
{
    display: none;
    position: absolute;
    width: 100%;
    height: 80%;
    top: 0px; left: 0px;
}
#modalPageCompany
{
    display: none;
    position: absolute;
    width: 100%;
    height: 80%;
    top: 0px; left: 0px;
}
.modalBackground
{
    filter: Alpha(Opacity=40); -moz-opacity:0.4; opacity: 0.4;
    width: 100%; height: 100%; background-color: #999999;
    position: absolute;
    z-index: 500;
    top: 0px; left: 0px;
}
.modalContainer
{
    position: relative;
    width: 300px;
    left: 50%;
    top: 50%;
    z-index: 750;
}
.modal
{
    background-color: white;
    border: solid 2px #BE5E5E; position: relative;
    top: -150px;
    left: -150px;
    z-index: 1000;
    width: 600px;
    height: 400px;
    padding: 0px;
}
.modalTop
{
    width: 594px;
    background-color: #BE5E5E;
    padding: 4px;
    color: #ffffff;
    text-align: right;
}
.modalTop a, .modalTop a:visited
{
    color: #ffffff;
}
.modalBody
{
    padding: 10px;
}
</style>


<!--Start for companies tab-->
<apex:tab label="Companies" name="companies" style="font-weight:bold;">
<table width="100%">
    <tr><td><apex:outputLabel style="font-weight:bold;" value="Number of Companies: "/><apex:outputlabel id="companycountlabelid" style="font-weight:bold;color:blue;" value="{!companycount}"/></td></tr>
</table><br/>
<apex:pageBlock title="Companies" id="companiesblock" >
<center>
<apex:commandButton value="Add" action="{!clearcompanylist}" onclick="revealModal ('modalPageCompany')" reRender="companysearchdisplay,CompanyNameSearch"/>
<apex:commandButton value="Remove All"  reRender="companycountlabelid,companiesblock,addedcompaniesdatatable" action="{!removeallCompanies}"/>
</center>
<apex:pageBlocktable id="addedcompaniesdatatable" value="{! addedcompanyList}" var="ACL" rendered="{!addedcompanyblockdisplay}">
<apex:column headervalue="Action" width="5%"><apex:commandLink value="Remove"  reRender="companiesblock,addedcompaniesdatatable,companycountlabelid" action="{!removeCompany}">
<apex:param name="testparam" assignTo="{!deleteCompanyId}" value="{! ACL.companyId}"/></apex:commandlink></apex:column>
<apex:column headerValue="Company Name" value="{!ACL.CompanyName}"/>
</apex:pageBlocktable>
<apex:inputhidden id="hid3"/>
</apex:pageBlock>
</apex:tab>
<!--End for companies tab--> 

 

Hi Every One,

 

:smileysad::smileysad:

 

I have a requirement to arrange visual force tabs in multiple levels, i.e.; having tab1, tab2, tab3 in one line and tab4, tab5, tab6 in next line, like the way in which the tabs are arranged in mycomputer Properties section.

 

I tried having a tabpanel within a tab but it doesnt give impressive look. Could any one show me the right approach.

Do we have any App exchange tools for having tabs or any reusable component that can be used to have page developments in tabs like this.?

 

TIA

 

-Sushupsi

Hi All,

 

I have a weard requirement, but unable to understand how it could be met.

 

:smileysad:

 

 My requirement is to integrate with out look at the same time, it says that using the standard functionality provided by salesforce of populating the "To" in outlook "New Mail" Page , i need to populate the "Bcc" in similar way.

 

Could any one suggest a work around in Javascript etc; It would be a great  help.

 

I am also currently working on the same. Hope it could be resolved soon.

 

TIA

 

- Sushupsi

Hi All,

 

Long time since i have posted on the forums. Here i am with a request for suggestion.

 

I have developed the following component:

<apex:component controller="PickText">

    <script>
        function ShowText(list,text)
        {
            document.getElementById(list).style.visibility = "hidden";
            document.getElementById(list).style.display = "none";
            document.getElementById(text).style.visibility = "visible";
            document.getElementById(text).style.display = "inline";
            document.getElementById(text).focus();
        }
    </script>

    <span style="color:Blue;font-weight:bold"><apex:OutputLabel >Please Press a key to enable Text Entry</apex:OutputLabel></span><br/><br/>
    <apex:inputText id="inputone" style="visibility:hidden; display:none;" size="4" maxlength="2" value="{!SelectProduct}">
    <apex:actionSupport action="{!SaveText}" event="onblur" reRender="inputone"/>
    </apex:inputText>
    <apex:selectList id="sel" size="1" value="{!SelectProduct}" onkeypress="ShowText('{!$Component.sel}','{!$Component.inputone}');">
        <apex:selectOptions id="prodlist" value="{!ListValues}">
        </apex:selectOptions>
    </apex:selectList>
</apex:component>

 

 

The Controller for the component goes like this:

 

Public class PickText
{
    public PageReference SaveText() {
        return null;
    }
    Public String SelectProduct;
    Public List<SelectOption> getListValues()
    {
        List<SelectOption> ProdList = new List<SelectOption>();
        ProdList.add(new SelectOption('None','None'));
        ProdList.add(new SelectOption('MT','MT'));      
        ProdList.add(new SelectOption('MO','MO'));
        ProdList.add(new SelectOption('PPC','PPC'));
        ProdList.add(new SelectOption('UBP','UBP'));
        ProdList.add(new SelectOption('EPS','EP'));
        return ProdList;
    }

    Public String getSelectProduct(){
    return SelectProduct;
    }

    Public void setSelectProduct(String Product){
    this.SelectProduct = Product;
    system.debug('******'+SelectProduct);
    }
}

 

My query is when i have developed this component, the intention is to store the value from a text box or pick list into a back end field.

I have stored a value in the controller in a local variable.

 

When this component is used in a VF page, how do i access the value in the field. (The problem is the value is Stored in component's controller)

 

Any pointers are appreciated.

TIA

- Sushupsi

Hi All,

 

Firstly great thanks to one and all for such a great support on the forums.

 

I have a query, what does ESB(enterprise service bus) integration mean? How can it be achieved in sfdc. Please specify how much coding is involved etc;

 

-TIA

Sushupsi

Hi All,

 

Firstly thank you for all the support from the forums. It has been such a great help for developers.

 

My query for the day:

 

I wanted to auto populate few fields in the Excel sheet (spread sheet) from the details in the detailed page of a lead on click of a custom button.

 

I have tried the following approach :

 

<apex:page standardController="Account" contenttype="application/vnd.ms-excel#contacts.xls" cache="true">
<apex:form >
<apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false"/>
</apex:form>
</apex:page>

 Using the above approach i am able to create an excel that can accommodate only fixed format depending on the Detailed page design.

 

I would like to populate the fields in a pre-existing format of excel that is present on my desktop. Could any one direct me how could i feed or autopopulate the correct data in an existing proforma on a button click.

 

Do we use any webservices or a class, Please walk me through this.

Urgent help is needed.

 

TIA.

- Sushupsi.

Hi All,

 

Thank you to all the replies first of all.

 

:smileysad:

 

I have written a Batchable Class. Is this also called a BULK API ?

 

The entire program is working fine except an anomolous behavior. I have tried to run the class for an upload of 10000 records, when the entire batch run it updated only 1700 records. rest all records were not updated.

 

Below is my program:

 

global class Get_Account_Id_EPC implements Database.Batchable<sObject>
{
    Public String Query;

    Global  database.querylocator start(Database.BatchableContext BC){
        Return database.getquerylocator(query);
    }

    Global void execute(Database.BatchableContext BC, List<SObject> scope)
    {
        List<Express_Payment__c> updatelist = new List<Express_Payment__c>();
        List<Express_Payment__c> epsobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from Express_Payment__c limit 1000];

        for(Express_Payment__c records : epsobj){
            for(sObject s : scope){
                Account a = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == a.BPID__c && records.BP_Loc_Id__c == a.BP_Loc_Id__c){
                    records.Agent__c = a.id;
                    updatelist.add(records);
                    break;
                }
            }
        }
        update(updatelist);
        
        List<Utility_Bill_Payment__c> updatelist1 = new List<Utility_Bill_Payment__c>();
        List<Utility_Bill_Payment__c> ubpobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from Utility_Bill_Payment__c limit 1000];

        for(Utility_Bill_Payment__c records : ubpobj){
            for(sObject s : scope){
                Account b = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == b.BPID__c && records.BP_Loc_Id__c == b.BP_Loc_Id__c){
                    records.Agent__c = b.id;
                    updatelist1.add(records);
                    break;
                }
            }
        }
        update(updatelist1);
        
        List<PrePaid_Card__c> updatelist2 = new List<PrePaid_Card__c>();
        List<PrePaid_Card__c> ppcobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from PrePaid_Card__c limit 1000];

        for(PrePaid_Card__c records : ppcobj){
            for(sObject s : scope){
                Account c = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == c.BPID__c && records.BP_Loc_Id__c == c.BP_Loc_Id__c){
                    records.Agent__c = c.id;
                    updatelist2.add(records);
                    break;
                }
            }
        }
        update(updatelist2);
        
        List<MT_Volume_Reports__c> updatelist3 = new List<MT_Volume_Reports__c>();
        List<MT_Volume_Reports__c> mtannualobj = [Select  id,Agent__c,BPID__c,BP_Loc_Id__c from MT_Volume_Reports__c limit 1000];

        for(MT_Volume_Reports__c records : mtannualobj){
            for(sObject s : scope){
                Account d = (Account)s;
                if(records.BPID__c!=null && records.BP_loc_ID__c!=null&&records.BPID__c == d.BPID__c && records.BP_Loc_Id__c == d.BP_Loc_Id__c){
                    records.Agent__c = d.id;
                    updatelist3.add(records);
                    break;
                }
            }
        }
        update(updatelist3);
        
        List<MT_Volume__c> updatelist4 = new List<MT_Volume__c>();
        List<MT_Volume__c> mtobj = [Select  id,Agent__c,BPID__c,BP_Loc_Id__c from MT_Volume__c limit 1000];

        for(MT_Volume__c records : mtobj){
            for(sObject s : scope){
                Account e = (Account)s;
                if(records.BPID__c!=null && records.BP_loc_ID__c!=null&&records.BPID__c == e.BPID__c && records.BP_Loc_Id__c == e.BP_Loc_Id__c){
                    records.Agent__c = e.id;
                    updatelist4.add(records);
                    break;
                }
            }
        }
        update(updatelist4);
        
        List<MO_Volume__c> updatelist5 = new List<MO_Volume__c>();
        List<MO_Volume__c> moobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from MO_Volume__c limit 1000];
        for(MO_Volume__c records : moobj){
            for(sObject s : scope){
                Account f = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == f.BPID__c && records.BP_Loc_Id__c == f.BP_Loc_Id__c){
                    records.Agent__c = f.id;
                    updatelist5.add(records);
                    break;
                }
            }
        }
        update(updatelist5);
    }

    Global void finish(Database.BatchableContext info){
    }

    /* Test Coverage Class*/
    Public static testMethod void SEUpdateTest()
    {
        User currentUser = [Select u.Id From User u Where u.Id =: UserInfo.getUserID()];
        List<Account> testAccs = new List<Account>();
        for(integer i=0;i<10;i++)
        {
            Account testAccount = new Account(Name = 'TestAccount'+i, OwnerId = currentUser.Id);
            testAccs.add(testAccount);
        }
        insert testAccs;
        Test.starttest();
        Get_Account_Id_EPC sObj = new Get_Account_Id_EPC();
        sObj.Query = 'Select id,BPID__c,BP_Loc_Id__c from Account';
        ID BatchId = Database.executeBatch(sObj,500);
        test.stoptest();
        AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email from AsyncApexJob where Id = :BatchId];
        System.debug('\n\nFinal results are: '+a);
        //System.AssertEquals('Completed', a.status);
        //System.AssertEquals(0, a.NumberOfErrors);
    }

}

 In the above class six objects are updated using the query in the start method. But for every execution all the six loops are executed. When i have checked the "Apex Jobs" in "Monitoring section " (Administration Setup->Monitoring->Apex Jobs) i have found that Total batches was "133" and for any single update entire batch was running. Please explain me this concept and also my specific question is below:

 

1.) Why is that my batch of 10,000 records did'nt get updated rather only 1700 were processed. Is there any other way of setting the limit.

2.) Is there any thing that has to be changed in the above code so that all the records get updated in bulk like setting the batch size.

 

TIA

- Sushupsi

:smileysad::smileysad:

 

Hi All,

 

I have a urgent issue to be resolved. I have migrated my code into the production environment.

The code moved successfully in to the production area. But an issue arised on executing the piece of code in production.

 

I have written a batchable class to avoid governer limits, using the queryLoacator. Even then the issue isn't resolved.

 

Please enlighten me why such issues arise and provide some information on governor limits and how one could bypass them when bulk data query is required.

 

Please find my piece of code below.

global class Get_Account_Id_EPC implements Database.Batchable<sObject>
{
    Public String Query;

    Global  database.querylocator start(Database.BatchableContext BC){
        Return database.getquerylocator(query);
    }

    Global void execute(Database.BatchableContext BC, List<SObject> scope)
    {
        List<Express_Payment__c> updatelist = new List<Express_Payment__c>();
        List<Express_Payment__c> epsobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from Express_Payment__c limit 1000];

        for(Express_Payment__c records : epsobj){
            for(sObject s : scope){
                Account a = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == a.BPID__c && records.BP_Loc_Id__c == a.BP_Loc_Id__c){
                    records.Agent__c = a.id;
                    updatelist.add(records);
                    break;
                }
            }
        }
        update(updatelist);
        
        List<Utility_Bill_Payment__c> updatelist1 = new List<Utility_Bill_Payment__c>();
        List<Utility_Bill_Payment__c> ubpobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from Utility_Bill_Payment__c limit 1000];

        for(Utility_Bill_Payment__c records : ubpobj){
            for(sObject s : scope){
                Account b = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == b.BPID__c && records.BP_Loc_Id__c == b.BP_Loc_Id__c){
                    records.Agent__c = b.id;
                    updatelist1.add(records);
                    break;
                }
            }
        }
        update(updatelist1);
        
        List<PrePaid_Card__c> updatelist2 = new List<PrePaid_Card__c>();
        List<PrePaid_Card__c> ppcobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from PrePaid_Card__c limit 1000];

        for(PrePaid_Card__c records : ppcobj){
            for(sObject s : scope){
                Account c = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == c.BPID__c && records.BP_Loc_Id__c == c.BP_Loc_Id__c){
                    records.Agent__c = c.id;
                    updatelist2.add(records);
                    break;
                }
            }
        }
        update(updatelist2);
        
        List<MT_Volume_Reports__c> updatelist3 = new List<MT_Volume_Reports__c>();
        List<MT_Volume_Reports__c> mtannualobj = [Select  id,Agent__c,BPID__c,BP_Loc_Id__c from MT_Volume_Reports__c limit 1000];

        for(MT_Volume_Reports__c records : mtannualobj){
            for(sObject s : scope){
                Account d = (Account)s;
                if(records.BPID__c!=null && records.BP_loc_ID__c!=null&&records.BPID__c == d.BPID__c && records.BP_Loc_Id__c == d.BP_Loc_Id__c){
                    records.Agent__c = d.id;
                    updatelist3.add(records);
                    break;
                }
            }
        }
        update(updatelist3);
        
        List<MT_Volume__c> updatelist4 = new List<MT_Volume__c>();
        List<MT_Volume__c> mtobj = [Select  id,Agent__c,BPID__c,BP_Loc_Id__c from MT_Volume__c limit 1000];

        for(MT_Volume__c records : mtobj){
            for(sObject s : scope){
                Account e = (Account)s;
                if(records.BPID__c!=null && records.BP_loc_ID__c!=null&&records.BPID__c == e.BPID__c && records.BP_Loc_Id__c == e.BP_Loc_Id__c){
                    records.Agent__c = e.id;
                    updatelist4.add(records);
                    break;
                }
            }
        }
        update(updatelist4);
        
        List<MO_Volume__c> updatelist5 = new List<MO_Volume__c>();
        List<MO_Volume__c> moobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from MO_Volume__c limit 1000];
        for(MO_Volume__c records : moobj){
            for(sObject s : scope){
                Account f = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == f.BPID__c && records.BP_Loc_Id__c == f.BP_Loc_Id__c){
                    records.Agent__c = f.id;
                    updatelist5.add(records);
                    break;
                }
            }
        }
        update(updatelist5);
    }

    Global void finish(Database.BatchableContext info){
    }

    /* Test Coverage Class*/
    Public static testMethod void SEUpdateTest()
    {
        User currentUser = [Select u.Id From User u Where u.Id =: UserInfo.getUserID()];
        List<Account> testAccs = new List<Account>();
        for(integer i=0;i<10;i++)
        {
            Account testAccount = new Account(Name = 'TestAccount'+i, OwnerId = currentUser.Id);
            testAccs.add(testAccount);
        }
        insert testAccs;
        Test.starttest();
        Get_Account_Id_EPC sObj = new Get_Account_Id_EPC();
        sObj.Query = 'Select id,BPID__c,BP_Loc_Id__c from Account';
        ID BatchId = Database.executeBatch(sObj,500);
        test.stoptest();
        AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email from AsyncApexJob where Id = :BatchId];
        System.debug('\n\nFinal results are: '+a);
        //System.AssertEquals('Completed', a.status);
        //System.AssertEquals(0, a.NumberOfErrors);
    }

}

 

Above is my batchable class.

 

Using below code i invoke the batchable class :

    public void exec6(){
        Get_Account_Id_EPC epcQuery = new Get_Account_Id_EPC();
        epcQuery.Query = 'Select id,BPID__c,BP_Loc_Id__c from Account';
        ID batchprocessid = Database.executeBatch(epcQuery);
   }

 

The issue arises when i tr to execute the code in production giving out an error System.LimitException: Too many script statements: 1000001, Pointing to the following line:

 

if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == f.BPID__c && records.BP_Loc_Id__c == f.BP_Loc_Id__c)

 

I am failing to understand why this error is occuring. Please help me with the same.

 

I am running out of time :(

Any pointers are appreciated.

 

- TIA

 

Sushupsi 

Hi All,

 

:smileysad::smileysad:

 

I am trying to use Bulk API instead of dataloader for loading bulk data into salesforce.
In Bulk API Developer's Guide , The following steps are mentioned to create a JAR file
of partner wsdl using wsc-18.jar file and to include both the jar files in library.

 

To download the Salesforce.com WSC toolkit:

1. Browse to http://code.google.com/p/sfdc-wsc/
2. Click the Downloads tab.
3. Click the wsc-18.jar link and save the file to a local directory.
The Bulk API does not provide a login operation, so you must use the SOAP Web services API to login.

To download the partner WSDL and compile it to Java classes with the WSC toolkit:
1. Log in to your Developer Edition Salesforce.com account. You must log in as an administrator or as a user who has the
“Modify All Data” permission. Logins are checked to ensure they are from a known IP address. For more information,
see “Setting Login Restrictions” in the Salesforce.com online help.
2. Navigate to Setup ? Develop ? API.
3. Right-click Partner WSDL to display your browser's save options, and save the partner WSDL to a local directory. For
information about the partner WSDL, see Using the Partner WSDL.
4. Compile the partner API code from the WSDL using the WSC compile tool:
java -classpath pathToJar\wsc.jar com.sforce.ws.tools.wsdlc pathToWSDL\wsdlFilename
.\wsdlGenFiles.jar


For example, if wsc.jar is installed in C:\salesforce\wsc, and the partner WSDL is saved to
C:\salesforce\wsdl\partner:
java -classpath C:\salesforce\wsc\wsc-18.jar com.sforce.ws.tools.wsdlc
C:\salesforce\wsdl\partner\partner.wsdl .\partner.jar
wsc.jar and the generated partner.jar are the only libraries needed in the classpath for the code examples in the
following sections.

 

Now when i try running the wsc-18 jar file in jdk1.6 using commandprompt or eclipse , its throwing the exception -
java.lang.ClassFormatError: LVTT entry for 'ent' in class file com/sforce/ws/transport/JdkHttpTransport does not match any LVT entry
at java.lang.ClassLoader.defineClass1(Native Method)

(JdkHttpTransport is a class in com.sforce.ws.transport package of wsc-18 jar)
 
if i run the wsc-18 jar in jdk1.5 , its throwing the exception - java.lang.unsupportedclassversionerror.

Please help me in solving this issue.

:smileysad:

 

TIA

- Sushupsi 

:smileyvery-happy: Hi All,

 

It has been quite a while i have posted my query on the forums. Its Query time again :)

Firstly Appreciate the help rendered on the forums.

 

My Query as Follows:

 

In integration with black berry, we have a requirement of extracting the data pertaining to an object and display the resulted data in a table. To fulfill this requirement we have used the VF page.

 

:smileysad::smileysad:

Un fortunately we observed that in black berry any custom object tabs etc.; are made visible by default but the custom tabs are not visible.

 

There was an option 'Mobile Ready' checkbox for the custom tabs.

 

We have enabled that feature but the issue is that the VF page that is used in over riding the tab is not visible in the black berry.

 

Could any one suggest what is the best work around for this.

If a BlackBerry doesnt support any VF pages can we go for the 'Report' generation as a work around.

 

TIA

 - Sushupsi

Hi All,

 

:smileysad::smileysad:

 

I have been trying to upsert using the dataloader batch mode. But i am facing few issues doing the same. Any help is appreciated.

 

Please find below the bean for upserting the Opportunity object. During upsert i need to use identifier other than the salesforce generated id (15 digit unique identifier). I have created an autonumber field which is being used as the unique reference key

I marked it as 'External Identifier' while creating the fields . My field is 'Salesforce_Opportunity_ID__c'.

 

Please find below my bean and mapping file and error details for suggesting appropriate solution.

 

    <bean id="OpportunityUpdate"
              class="com.salesforce.dataloader.process.ProcessRunner"
              singleton="false">
            <description>The Opportunity Object is updated using the Savvion generated '.csv' file.</description>
            <property name="name" value="OpportunityUpdate"/>
            <property name="configOverrideMap">
            <map>
		    <entry key="sfdc.debugMessages" value="false"/>
		    <entry key="sfdc.debugMessagesFile" value="E:\DebugLogs"/>
		    <entry key="sfdc.endpoint" value="https://test.salesforce.com"/>
		    <entry key="sfdc.username" value="mylogin@login.com"/>
		    <!-- password below has been encrypted using key file, therefore it will not work without the key setting: process.encryptionKeyFile
		    the password is not a valid encrypted value, please generate the real value using encrypt.bat utility -->
		    <entry key="sfdc.password" value="my encrypted password"/>
		    <entry key="process.encryptionKeyFile" value="E:\key.txt"/>
		    <entry key="sfdc.timeoutSecs" value="600"/>
		    <entry key="sfdc.loadBatchSize" value="200"/>
		    <entry key="sfdc.entity" value="Opportunity"/>
		    <entry key="process.operation" value="upsert"/>
		    <entry key="sfdc.externalIdField" value="Salesforce_Opportunity_ID__c"/>
		    <entry key="process.mappingFile" value="E:\updateMap.sdl"/>
		    <entry key="dataAccess.type" value="csvRead"/>
		    <entry key="process.statusOutputDirectory" value="E:\Log Files\"/>
		    <entry key="process.outputSuccess" value="E:\Success Files\Process_success.csv"/>
		    <entry key="process.outputError" value="E:\Failure Files\Process_failure.csv"/>
		    <entry key="sfdc.proxyHost" value="10.136.64.195" />
		    <entry key="sfdc.proxyPort" value="80" />
		    <entry key="sfdc.proxyUsername" value="s@.sfdc.com" />
		    <entry key="sfdc.proxyPassword" value="" />
		    <entry key="dataAccess.name" value="E:\Opp_Update.csv"/>
            </map>
            </property>
    </bean>

 My mapping file is as follows :

 

SALESFORCE_OPPORTUNITY_ID__C=Salesforce_Opportunity_ID__c

 

But i am facing the following error while i run the bean from command prompt.

39562 [OpportunityUpdate] ERROR com.salesforce.dataloader.client.Partne
rClient  - Error code is:INVALID_FIELD_FOR_INSERT_UPDATE
39562 [OpportunityUpdate] ERROR com.salesforce.dataloader.client.Partne
rClient  - Error message:Unable to create/update fields: Salesforce_Opportunity_
ID__c. Please check the security settings of this field and verify that it is re
ad/write for your profile.

 Since i am in the admin profile i donot understand wat else can be done, already the external id field is readonly visible to all (since it is autonumber readonly by default).When i tried the same in other org of mine it didn't throw any error and worked well at the very first instance. I am unable to contemplate the error and am struggling :smileysad:

 

Please respond ASAP , im in need of urgent help :(

The forums have been great help always hope to find solution again :) :D

 

TIA

- Sushupsi

:smileysad::smileysad:

 

Hi All,

 

I have a requirement to make few Fields mandatory in the intermediatory Convert Layout of the Lead tab. I was searching for a solution as to how to modify the code for "Convert" functionality. Please help me on this by providing any code snippets as to how to begin the coding.

 

My Queries are:

 

1.) Can a Trigger be written on the Convert button and be addressed as  "Before convert" some thing like that.

 

2.) Please throw light on how to design a custom button , which on click performs the exact functionality as Convert Lead.

 

3.) Please provide information about "ConvertLead" function. I happened to see this kind of discussion on the boards, Hope i am right with that.. Please provide me with a snippet as to how to customise that functionality.

 

4.) How do i append any custom field information filled while conversion (a mandatory field while converting) to the opportunity name,like  "Opportunity name : opportunity-myfield name".

 

Please help me with this , help is urgently needed.

TIA.

 

Sushupsi.

:smileysad::smileysad:

 

We have a critical issue that needs immediate help.

 

We are trying to integrate few systems which are external to Salesforce. The systems are Oracle based systems.

We need a lead as to how to proceed with the integration thing.

 

We are searching for an optimal solution which would drop the need of intermediatory staging tables etc;

 

Please help us with the following queries :

 

1.) A solution was proposed for how to extract data from Oracle systems and Push the same into SFDC.

The solution being the usage of JDBC connectivity and using java programming quering the Oracle systrems and invoking a method which is in SFDC by passing the queried data as parameters into this method which would push the data into the objects.

 

2.) The use of web-services in such cases.

 

3.) Oracle Connect which we have seen in the Ssalesforce guide. Is this intended for requirements like ours?

 

Please respond ASAP. TIA.

Hi all,

 

I have a requirement of creating a contact and by default giving the mandatory field 'Account'

 

I am populating all the information like address , phone, email from a VF page, I have a field which actually indicates an Account for which the contact is being created.

 

if i have an id of account like a 15digit number and tried to store in the Contact.Account field it doesn't allow me.

 

When i try to store it in the contact.Account field it stores as empty :( :smileysad:, but it shows the id in the debug log ideally..

 

Any help is appreciated.

 

TIA

 

Hi All,

 

I have recently been doing a requirement with google visualizations. I was successfully get the charts to work for me by plotting the values, but need some help with how the conversion rates would be visible.

 

The Scenario is as below:

 

We have a Corporate Currency - or organization default currency.

 

We have a user default currency on the user Record

 

We have a default currency for every record when Currency feature is enabled in our organization, which is the corporate currency. You may change this value while loading data in bulk or creating via UI.

 

Having said that when a user has data in the USD currency for instance and his personal currency is CHF (swiss franks), when veviews the records we would be able to see USD value as well as in brackets the converted CHF.

 

ex: 1234.45 USD (3673.CHF) ----> This is just an example to show how data is viewed on the detailed page.

 

But in my graph i am able to see it as 1234.45 and no converted values.

 

If someone has worked on this please let me know.

 

TIA.

 

Warm Regards,

Sushupsi

 

Hi All,

 

I have been using the google visualizations to show some data realted to account. I have an object which looks like this:

 Field Name    Field Type

Account          Look up to Account

Type    Actual, Budget or Forecast

UOM/Currency           Identify UOM or Currency

Year    Number

Jan       Number

Feb      Number

March  Number

April    Number

May     Number

June     Number

July      Number

Aug     Number

Sept     Number

Oct      Number

Nov     Number

Dec      Number

 Records exist for various years with data for months and a Type. Based on the Type i need to pick the values of the months and show a graph like this:

 

Values on Y axis and Months on X-axis.

 

 

I am struggling with the VisualForce lineChart Component from the Code Share Project. i am not able to understand how can i associate multiple chart data into a JaSON object. Please advice.

 

 @BobBuzzard - please can you help me with the same.

 

 

Hi Every One,

 

:smileysad::smileysad:

 

I have a requirement to arrange visual force tabs in multiple levels, i.e.; having tab1, tab2, tab3 in one line and tab4, tab5, tab6 in next line, like the way in which the tabs are arranged in mycomputer Properties section.

 

I tried having a tabpanel within a tab but it doesnt give impressive look. Could any one show me the right approach.

Do we have any App exchange tools for having tabs or any reusable component that can be used to have page developments in tabs like this.?

 

TIA

 

-Sushupsi

Hi All,

 

I have a weard requirement, but unable to understand how it could be met.

 

:smileysad:

 

 My requirement is to integrate with out look at the same time, it says that using the standard functionality provided by salesforce of populating the "To" in outlook "New Mail" Page , i need to populate the "Bcc" in similar way.

 

Could any one suggest a work around in Javascript etc; It would be a great  help.

 

I am also currently working on the same. Hope it could be resolved soon.

 

TIA

 

- Sushupsi

Hi All,

 

Long time since i have posted on the forums. Here i am with a request for suggestion.

 

I have developed the following component:

<apex:component controller="PickText">

    <script>
        function ShowText(list,text)
        {
            document.getElementById(list).style.visibility = "hidden";
            document.getElementById(list).style.display = "none";
            document.getElementById(text).style.visibility = "visible";
            document.getElementById(text).style.display = "inline";
            document.getElementById(text).focus();
        }
    </script>

    <span style="color:Blue;font-weight:bold"><apex:OutputLabel >Please Press a key to enable Text Entry</apex:OutputLabel></span><br/><br/>
    <apex:inputText id="inputone" style="visibility:hidden; display:none;" size="4" maxlength="2" value="{!SelectProduct}">
    <apex:actionSupport action="{!SaveText}" event="onblur" reRender="inputone"/>
    </apex:inputText>
    <apex:selectList id="sel" size="1" value="{!SelectProduct}" onkeypress="ShowText('{!$Component.sel}','{!$Component.inputone}');">
        <apex:selectOptions id="prodlist" value="{!ListValues}">
        </apex:selectOptions>
    </apex:selectList>
</apex:component>

 

 

The Controller for the component goes like this:

 

Public class PickText
{
    public PageReference SaveText() {
        return null;
    }
    Public String SelectProduct;
    Public List<SelectOption> getListValues()
    {
        List<SelectOption> ProdList = new List<SelectOption>();
        ProdList.add(new SelectOption('None','None'));
        ProdList.add(new SelectOption('MT','MT'));      
        ProdList.add(new SelectOption('MO','MO'));
        ProdList.add(new SelectOption('PPC','PPC'));
        ProdList.add(new SelectOption('UBP','UBP'));
        ProdList.add(new SelectOption('EPS','EP'));
        return ProdList;
    }

    Public String getSelectProduct(){
    return SelectProduct;
    }

    Public void setSelectProduct(String Product){
    this.SelectProduct = Product;
    system.debug('******'+SelectProduct);
    }
}

 

My query is when i have developed this component, the intention is to store the value from a text box or pick list into a back end field.

I have stored a value in the controller in a local variable.

 

When this component is used in a VF page, how do i access the value in the field. (The problem is the value is Stored in component's controller)

 

Any pointers are appreciated.

TIA

- Sushupsi

Hi All,

 

Firstly thank you for all the support from the forums. It has been such a great help for developers.

 

My query for the day:

 

I wanted to auto populate few fields in the Excel sheet (spread sheet) from the details in the detailed page of a lead on click of a custom button.

 

I have tried the following approach :

 

<apex:page standardController="Account" contenttype="application/vnd.ms-excel#contacts.xls" cache="true">
<apex:form >
<apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false"/>
</apex:form>
</apex:page>

 Using the above approach i am able to create an excel that can accommodate only fixed format depending on the Detailed page design.

 

I would like to populate the fields in a pre-existing format of excel that is present on my desktop. Could any one direct me how could i feed or autopopulate the correct data in an existing proforma on a button click.

 

Do we use any webservices or a class, Please walk me through this.

Urgent help is needed.

 

TIA.

- Sushupsi.

:smileysad::smileysad:

 

Hi All,

 

I have a urgent issue to be resolved. I have migrated my code into the production environment.

The code moved successfully in to the production area. But an issue arised on executing the piece of code in production.

 

I have written a batchable class to avoid governer limits, using the queryLoacator. Even then the issue isn't resolved.

 

Please enlighten me why such issues arise and provide some information on governor limits and how one could bypass them when bulk data query is required.

 

Please find my piece of code below.

global class Get_Account_Id_EPC implements Database.Batchable<sObject>
{
    Public String Query;

    Global  database.querylocator start(Database.BatchableContext BC){
        Return database.getquerylocator(query);
    }

    Global void execute(Database.BatchableContext BC, List<SObject> scope)
    {
        List<Express_Payment__c> updatelist = new List<Express_Payment__c>();
        List<Express_Payment__c> epsobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from Express_Payment__c limit 1000];

        for(Express_Payment__c records : epsobj){
            for(sObject s : scope){
                Account a = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == a.BPID__c && records.BP_Loc_Id__c == a.BP_Loc_Id__c){
                    records.Agent__c = a.id;
                    updatelist.add(records);
                    break;
                }
            }
        }
        update(updatelist);
        
        List<Utility_Bill_Payment__c> updatelist1 = new List<Utility_Bill_Payment__c>();
        List<Utility_Bill_Payment__c> ubpobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from Utility_Bill_Payment__c limit 1000];

        for(Utility_Bill_Payment__c records : ubpobj){
            for(sObject s : scope){
                Account b = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == b.BPID__c && records.BP_Loc_Id__c == b.BP_Loc_Id__c){
                    records.Agent__c = b.id;
                    updatelist1.add(records);
                    break;
                }
            }
        }
        update(updatelist1);
        
        List<PrePaid_Card__c> updatelist2 = new List<PrePaid_Card__c>();
        List<PrePaid_Card__c> ppcobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from PrePaid_Card__c limit 1000];

        for(PrePaid_Card__c records : ppcobj){
            for(sObject s : scope){
                Account c = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == c.BPID__c && records.BP_Loc_Id__c == c.BP_Loc_Id__c){
                    records.Agent__c = c.id;
                    updatelist2.add(records);
                    break;
                }
            }
        }
        update(updatelist2);
        
        List<MT_Volume_Reports__c> updatelist3 = new List<MT_Volume_Reports__c>();
        List<MT_Volume_Reports__c> mtannualobj = [Select  id,Agent__c,BPID__c,BP_Loc_Id__c from MT_Volume_Reports__c limit 1000];

        for(MT_Volume_Reports__c records : mtannualobj){
            for(sObject s : scope){
                Account d = (Account)s;
                if(records.BPID__c!=null && records.BP_loc_ID__c!=null&&records.BPID__c == d.BPID__c && records.BP_Loc_Id__c == d.BP_Loc_Id__c){
                    records.Agent__c = d.id;
                    updatelist3.add(records);
                    break;
                }
            }
        }
        update(updatelist3);
        
        List<MT_Volume__c> updatelist4 = new List<MT_Volume__c>();
        List<MT_Volume__c> mtobj = [Select  id,Agent__c,BPID__c,BP_Loc_Id__c from MT_Volume__c limit 1000];

        for(MT_Volume__c records : mtobj){
            for(sObject s : scope){
                Account e = (Account)s;
                if(records.BPID__c!=null && records.BP_loc_ID__c!=null&&records.BPID__c == e.BPID__c && records.BP_Loc_Id__c == e.BP_Loc_Id__c){
                    records.Agent__c = e.id;
                    updatelist4.add(records);
                    break;
                }
            }
        }
        update(updatelist4);
        
        List<MO_Volume__c> updatelist5 = new List<MO_Volume__c>();
        List<MO_Volume__c> moobj = [Select  id,Agent__c,BP_ID__c,BP_Loc_Id__c from MO_Volume__c limit 1000];
        for(MO_Volume__c records : moobj){
            for(sObject s : scope){
                Account f = (Account)s;
                if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == f.BPID__c && records.BP_Loc_Id__c == f.BP_Loc_Id__c){
                    records.Agent__c = f.id;
                    updatelist5.add(records);
                    break;
                }
            }
        }
        update(updatelist5);
    }

    Global void finish(Database.BatchableContext info){
    }

    /* Test Coverage Class*/
    Public static testMethod void SEUpdateTest()
    {
        User currentUser = [Select u.Id From User u Where u.Id =: UserInfo.getUserID()];
        List<Account> testAccs = new List<Account>();
        for(integer i=0;i<10;i++)
        {
            Account testAccount = new Account(Name = 'TestAccount'+i, OwnerId = currentUser.Id);
            testAccs.add(testAccount);
        }
        insert testAccs;
        Test.starttest();
        Get_Account_Id_EPC sObj = new Get_Account_Id_EPC();
        sObj.Query = 'Select id,BPID__c,BP_Loc_Id__c from Account';
        ID BatchId = Database.executeBatch(sObj,500);
        test.stoptest();
        AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems, CreatedBy.Email from AsyncApexJob where Id = :BatchId];
        System.debug('\n\nFinal results are: '+a);
        //System.AssertEquals('Completed', a.status);
        //System.AssertEquals(0, a.NumberOfErrors);
    }

}

 

Above is my batchable class.

 

Using below code i invoke the batchable class :

    public void exec6(){
        Get_Account_Id_EPC epcQuery = new Get_Account_Id_EPC();
        epcQuery.Query = 'Select id,BPID__c,BP_Loc_Id__c from Account';
        ID batchprocessid = Database.executeBatch(epcQuery);
   }

 

The issue arises when i tr to execute the code in production giving out an error System.LimitException: Too many script statements: 1000001, Pointing to the following line:

 

if(records.BP_ID__c!=null && records.BP_loc_ID__c!=null&&records.BP_ID__c == f.BPID__c && records.BP_Loc_Id__c == f.BP_Loc_Id__c)

 

I am failing to understand why this error is occuring. Please help me with the same.

 

I am running out of time :(

Any pointers are appreciated.

 

- TIA

 

Sushupsi 

Hi All,

 

:smileysad::smileysad:

 

I am trying to use Bulk API instead of dataloader for loading bulk data into salesforce.
In Bulk API Developer's Guide , The following steps are mentioned to create a JAR file
of partner wsdl using wsc-18.jar file and to include both the jar files in library.

 

To download the Salesforce.com WSC toolkit:

1. Browse to http://code.google.com/p/sfdc-wsc/
2. Click the Downloads tab.
3. Click the wsc-18.jar link and save the file to a local directory.
The Bulk API does not provide a login operation, so you must use the SOAP Web services API to login.

To download the partner WSDL and compile it to Java classes with the WSC toolkit:
1. Log in to your Developer Edition Salesforce.com account. You must log in as an administrator or as a user who has the
“Modify All Data” permission. Logins are checked to ensure they are from a known IP address. For more information,
see “Setting Login Restrictions” in the Salesforce.com online help.
2. Navigate to Setup ? Develop ? API.
3. Right-click Partner WSDL to display your browser's save options, and save the partner WSDL to a local directory. For
information about the partner WSDL, see Using the Partner WSDL.
4. Compile the partner API code from the WSDL using the WSC compile tool:
java -classpath pathToJar\wsc.jar com.sforce.ws.tools.wsdlc pathToWSDL\wsdlFilename
.\wsdlGenFiles.jar


For example, if wsc.jar is installed in C:\salesforce\wsc, and the partner WSDL is saved to
C:\salesforce\wsdl\partner:
java -classpath C:\salesforce\wsc\wsc-18.jar com.sforce.ws.tools.wsdlc
C:\salesforce\wsdl\partner\partner.wsdl .\partner.jar
wsc.jar and the generated partner.jar are the only libraries needed in the classpath for the code examples in the
following sections.

 

Now when i try running the wsc-18 jar file in jdk1.6 using commandprompt or eclipse , its throwing the exception -
java.lang.ClassFormatError: LVTT entry for 'ent' in class file com/sforce/ws/transport/JdkHttpTransport does not match any LVT entry
at java.lang.ClassLoader.defineClass1(Native Method)

(JdkHttpTransport is a class in com.sforce.ws.transport package of wsc-18 jar)
 
if i run the wsc-18 jar in jdk1.5 , its throwing the exception - java.lang.unsupportedclassversionerror.

Please help me in solving this issue.

:smileysad:

 

TIA

- Sushupsi 

:smileysad::smileysad:

 

Hi All,

 

I have a requirement to make few Fields mandatory in the intermediatory Convert Layout of the Lead tab. I was searching for a solution as to how to modify the code for "Convert" functionality. Please help me on this by providing any code snippets as to how to begin the coding.

 

My Queries are:

 

1.) Can a Trigger be written on the Convert button and be addressed as  "Before convert" some thing like that.

 

2.) Please throw light on how to design a custom button , which on click performs the exact functionality as Convert Lead.

 

3.) Please provide information about "ConvertLead" function. I happened to see this kind of discussion on the boards, Hope i am right with that.. Please provide me with a snippet as to how to customise that functionality.

 

4.) How do i append any custom field information filled while conversion (a mandatory field while converting) to the opportunity name,like  "Opportunity name : opportunity-myfield name".

 

Please help me with this , help is urgently needed.

TIA.

 

Sushupsi.

Hi all,

 

I have a requirement of creating a contact and by default giving the mandatory field 'Account'

 

I am populating all the information like address , phone, email from a VF page, I have a field which actually indicates an Account for which the contact is being created.

 

if i have an id of account like a 15digit number and tried to store in the Contact.Account field it doesn't allow me.

 

When i try to store it in the contact.Account field it stores as empty :( :smileysad:, but it shows the id in the debug log ideally..

 

Any help is appreciated.

 

TIA

 

:smileysad: Hi all,

 

I am facing a problem regarding storing id in a lookup field.

 

I have to store contact ids in to lookup fields (via customised lookup) , my code is as follows :

 

Constructor is as follows : Public class class1{ public FinalCustomContact(Id acc) { newContact = ''; Id id = ApexPages.currentpage().getParameters().get('id'); rObj = (id == null) ? new caps__c():[SELECT accountname__c,name,central_contact__c from caps__c]; num = ApexPages.currentPage().getParameters().get('num'); contact = new List<contact>(); this.accname = acc; contact = [Select id,Name,LastName,Email from contact where contact.Account.id = :acc]; this.varname = null; this.idid = null; if(contact.size()==0){ msg1='No records were found based on your criteria'; } else{ } system.debug('--------------'+rObj.Central_Contact__c); //here the contact lookup displays null. } } My class from where im calling the above method which belongs to Class1: public class clss2{ ------- some code ----- Public class1 fObj{get; set;} public PageReference accountsel() { this.accname = cObj.accountname__c; system.debug('Account Name---:'+ cObj.accountname__c); fObj = new FinalCustomContact(cObj.accountname__c); return null; } if(fObj!=null && fObj.rObj != null){ system.debug('-------------'+'InsideCONTS'+fObj.rObj.Central_Contact__c); //here it displays empty. if(fObj.rObj.Central_Contact__c!='' ){ cObj.Central_Contact__c = fObj.rObj.Central_Contact__c; //here error is thrown saying Id is invalid. } } }

 

Urgent help is needed please help us on this issue. I have tried many workarounds but couldnt succeed