• gopikrishna
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 74
    Questions
  • 38
    Replies
Hi

Based on account Record type or field type Accounts not visible in global search. for example if Account record type is "Lead Account" or field(check box) is true that records not visible in global search. if possible please guide me ?

Thanks
Gopikrishna
Can anyone have sample code for getting salesforce data into simple html page using ajax
Hi all,

why Account Territory field not display in visualforce page,if possible please share me how to display territory field in vf page
Hi all,

google maps shows blank page.

page:

<apex:page Controller="AccountList" sidebar="false">

<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>

   
   <style>   
        #map {
            font-family: Arial;
            font-size:12px;
            line-height:normal !important;
            height:400px;       
            padding: 20px;
        }      
        .roundCornerCss{
            /* outer shadows  (note the rgba is red, green, blue, alpha) */
            -webkit-box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.4);
            -moz-box-shadow: 0px 1px 6px rgba(23, 69, 88, .5);
           
            /* rounded corners */
            -webkit-border-radius: 12px;
            -moz-border-radius: 7px;
            border-radius: 7px;
           
            /* gradients */
            background: -webkit-gradient(linear, left top, left bottom,
            color-stop(0%, white), color-stop(15%, white), color-stop(100%, #D7E9F5));
            background: -moz-linear-gradient(top, white 0%, white 55%, #D5E4F3 130%);
        }  
    </style> 
    <script type="text/javascript">                  
        var geocoder;
        var map;
        var infowindow = new google.maps.InfoWindow();
        var places = [];
        var title_content = new Array();                   
        var popup_content = new Array();                   
        var address = new Array();
        var address_position = 0;                   
        var timeout = 600;
        function initialize(){
            geocoder = new google.maps.Geocoder();
            var latlng = new google.maps.LatLng(29.01, 77.38);
            var myOptions = {
              zoom: 2,
              center: latlng,
              mapTypeId: 'roadmap'
            }
            <apex:repeat value="{!objAccounts}" var="loc" id="addressesId">
                title_content.push("Name: "+"{!loc.Name}"+" \nClick for more Detail");                
                address.push("{!loc.BillingStreet}, {!loc.BillingCity},
                +"{!loc.BillingPostalCode},{!loc.BillingCountry}");
                popup_content.push("<b>Account Name: {!loc.Name}
                +"<br/>Street: {!loc.BillingStreet}"
                +"<br/>City: {!loc.BillingCity}<br/>Postal Code: {!loc.BillingPostalCode}"+
                +"<br/>Country: {!loc.BillingCountry }</b>");                                                   
            </apex:repeat>   
            map = new google.maps.Map(document.getElementById("map"), myOptions);
            addMarker(address_position);
        }       
        function addMarker(position){
            geocoder.geocode({'address': address[position]}, function(results, status){
                if (status == google.maps.GeocoderStatus.OK) {
                    places[position] = results[0].geometry.location;                                   
                    var marker = new google.maps.Marker({
                        position: places[position],
                        title:title_content[position],
                        icon: getMapIconUrl(position+1),
                        map: map
                    });
       
                    google.maps.event.addListener(marker, 'click', function() {
                        if (!infowindow) {
                            infowindow = new google.maps.InfoWindow();
                        }
                        infowindow.setContent(popup_content[position]);
                        infowindow.open(map, marker);
                    });
                }
                else{
                    if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT){
                        setTimeout(function() { addMarker(position); }, (timeout * 3));
                    }
                }
                address_position++;
                if (address_position < address.length){
                    setTimeout(function() { addMarker(address_position); }, (timeout));
                }
            });
        }
        /*
            @Description: To Put diffren color image on Google Map
            @Param: Marker Number to Add on map.
        */
        function getMapIconUrl(markerNumber){
            if(markerNumber > 21){
                markerNumber = markerNumber%20;
            }                   
            var mapIconUrl = "{!URLFOR($Resource.GoogleMarkers, 'GoogleMark/1.png')}";
            var newIcon = markerNumber+'.png';
            mapIconUrl = mapIconUrl.replace('1.png',newIcon);
            return mapIconUrl;
        }        
    </script> 
    <apex:pageMessages />
    <div id="map" class="roundCornerCss"></div>  
    <script>
         initialize();
    </script>
</apex:page>

Hi All,

 

How to migrate the data from one salesforce organization to another salesforce organization. Here first organization have Five custom objects with Look up Relationships, how to insert first organization object records  to second organization with out manual mapping between the objects(Relationship objects). Is this possible? If yes which tool is better for doing this work. Please guide me.

 

Thank you.

 Hi all,

I am unable to figure out how i can write test methods to cover code for red mark code.

Can any one point me in the right direction?

 

My Class and Test method :

 

public class SMTP_Server_BulkChange {
   
    public string serverid{get;set;}
    public List<IMU_SMTP__c> lstSMTP{get;set;}
    public IMU_SMTP__c SMTP{get;set;}
    public string checked_Item{get;set;}
    public boolean SMTPselected{get;set;}
    public boolean updateselected{get;set;}
    public IMU_SMTP__c SMTPnew{get;set;}
    
    public class Imusmtp
    {
     public boolean ischecked{set;get;}
     public IMU_SMTP__c Smtp{set;get;}
    }
    public list<Imusmtp> SMTPlist{set;get;}
    
    public SMTP_Server_BulkChange(ApexPages.StandardSetController stdController) {
    //--------- new code --------------------------------------------------
    
     serverid = apexpages.currentpage().getparameters().get('id');
      SMTPselected = true;
      updateselected = false;
       SMTPnew=new IMU_SMTP__c ();
       SMTPlist=new list<Imusmtp>();
     for(IMU_SMTP__c im:[select id,name,IP__c,Subscription__c,POP_Username__c,EMail__c,Status__c,Server__c,Status_Date__c,IMU_Client__c,Hourly_Speed_Limit__c from IMU_SMTP__c   where Server__c=:apexpages.currentpage().getparameters().get('id')])
     {
      Imusmtp Imu=new Imusmtp();
      Imu.smtp=im;
      Imu.ischecked=false;
      SMTPlist.add(imu);
     }
       
       //--------------------------------------------------------------------
       
      //  lstSMTP = new List<IMU_SMTP__c>();
       // SMTP = new IMU_SMTP__c();
                
     /*   for(sObject s:stdController.getSelected()){
            IMU_SMTP__c smtp = (IMU_SMTP__c)s;
            lstSMTP.add(smtp);
        }*/
        string s;
        for(Schema.FieldSetMember sf:sObjectType.IMU_SMTP__c.FieldSets.BulkChange_SMTP.getFields())
            s = s+sf.fieldPath + '   ';
            system.debug('#'+s);         
            
        
    }
    
     list<IMU_SMTP__c> imulist{set;get;}
     
      public void submit()
      {
       imulist=new list<IMU_SMTP__c>();
        for(Imusmtp im:SMTPlist)
        {
        if(im.ischecked==true)
        {
         IMU_SMTP__c ImS=im.smtp;
          imulist.add(imS);
        }
       }
      SMTPselected = false;
      updateselected = true;
        
      
      }
    
    
    public void SelectAll()
    {
     for(Imusmtp im:SMTPlist)
     {
     im.ischecked=true;
     }
    }
    public void DeSelectAll()
    {
     for(Imusmtp im:SMTPlist)
     {
     im.ischecked=false;
     }
    }
   
    public Pagereference save(){
        for(IMU_SMTP__c s:imulist){
            
            if(Checked_Item.contains('Status__c'))
                s.Status__c = SMTPnew.Status__c;
            if(Checked_Item.contains('Status_Date__c'))
                s.Status_Date__c= SMTPnew.Status_Date__c;
            if(Checked_Item.contains('IMU_Client__c'))
                s.IMU_Client__c= SMTPnew.IMU_Client__c;
            if(Checked_Item.contains('RBL_Status__c'))
                s.RBL_Status__c= SMTPnew.RBL_Status__c;
            if(Checked_Item.contains('DomainNameServer'))
                s.DNS__c= SMTPnew.DNS__c;
            if(Checked_Item.contains('Postfix_Inbox__c'))
                s.Postfix_Inbox__c= SMTPnew.Postfix_Inbox__c;
            if(Checked_Item.contains('rDNS__c'))
                s.rDNS__c= SMTPnew.rDNS__c;
            if(Checked_Item.contains('Postfix_Patch__c'))
                s.Postfix_Patch__c= SMTPnew.Postfix_Patch__c;
            if(Checked_Item.contains('SPF__c'))
            s.SPF__c= SMTPnew.SPF__c;
            if(Checked_Item.contains('PMTA__c'))
            s.PMTA__c= SMTPnew.PMTA__c;
            if(Checked_Item.contains('Sender_ID__c'))
            s.Sender_ID__c= SMTPnew.Sender_ID__c;
            if(Checked_Item.contains('Mirror__c'))
            s.Mirror__c= SMTPnew.Mirror__c;
            if(Checked_Item.contains('DMARC__c'))
            s.DMARC__c= SMTPnew.DMARC__c;
            if(Checked_Item.contains('FTP__c'))
            s.FTP__c= SMTPnew.FTP__c;
            if(Checked_Item.contains('DKIM__c'))
            s.DKIM__c= SMTPnew.DKIM__c;
            if(Checked_Item.contains('App_iMail__c'))
            s.App_iMail__c= SMTPnew.App_iMail__c;
            if(Checked_Item.contains('Catch_All__c'))
            s.Catch_All__c= SMTPnew.Catch_All__c;
            if(Checked_Item.contains('Interspire__c'))
            s.Interspire__c= SMTPnew.Interspire__c;
            if(Checked_Item.contains('POP_Username__c'))
            s.POP_Username__c= SMTPnew.POP_Username__c;
            if(Checked_Item.contains('POP_Password__c'))
            s.POP_Password__c= SMTPnew.POP_Password__c;
            if(Checked_Item.contains('FTP_Username__c'))
            s.FTP_Username__c= SMTPnew.FTP_Username__c;
            if(Checked_Item.contains('SMTP_Username__c'))
            s.SMTP_Username__c= SMTPnew.SMTP_Username__c;
            if(Checked_Item.contains('FTP_Password__c'))
            s.FTP_Password__c= SMTPnew.FTP_Password__c;
            if(Checked_Item.contains('SMTP_Password__c'))
            s.SMTP_Password__c= SMTPnew.SMTP_Password__c;
            if(Checked_Item.contains('Speed_Limit__c'))
            s.Speed_Limit__c= SMTPnew.Speed_Limit__c;
            if(Checked_Item.contains('DKIM_String__c'))
            s.DKIM_String__c= SMTPnew.DKIM_String__c;
            if(Checked_Item.contains('Notes__c'))
            s.Notes__c= SMTPnew.Notes__c;
           
        }
        update imulist;
        
        Pagereference Pageref;
        string RetId = ApexPages.CurrentPage().getParameters().get('id');
        Pageref = new PageReference('/' + '?Id=' + RetId );
        Pageref.setRedirect(true);
        return Pageref;
        
        
    }
    
    
    
  @isTest(seealldata=true)
    public static void testbulkchange(){
     list<IMU_SMTP__c> listsm = new list<IMU_SMTP__c>();
     list<IMU_SMTP__c> listsm1 = new list<IMU_SMTP__c>();
       IMU_Data_Center__c dc = new IMU_Data_Center__c();
        //dc.Data_Center__c = 'dc';
        dc.Status__c = 'Active';
        dc.Website__c = 'www.google.com';
        dc.Status_Date__c = system.now();
        dc.Billing_EMail__c = 'test@test.com';
        dc.Billing_Phone__c = '12345';
        dc.Support_Phone__c = '23456';
        dc.Support_EMail__c = 'test@test.com';
        dc.Contact_EMail__c = 'test@test.com';
        dc.Contact_Phone__c = '1234';
        dc.Abuse_EMail__c = 'test@test.com';
        dc.Name_on_Contract__c = 'test';
        dc.AS_Name__c = 'test';
        dc.Max_IPs_per_Server__c =2;
        dc.AS_Number__c = '44';
        dc.AS_Country__c = 'IN';
        dc.Contract_Terms__c = 'Month-to-Month';
        dc.IP_Assignment__c = 'multiple';
        dc.AS_Total_IPs__c = 44;
        dc.Provisioning_Time_Frame__c = '1 Day';
        dc.Base_Server_Price__c =44;
        dc.Support_Rating__c = 'Good';
        dc.Avg_Price_per_Extra_IP__c = 44;
        dc.Spam_Issue_Resolution__c ='test';
        dc.Setup_Fee_s__c = 78;
        dc.Notes__c = 'test';
        insert dc;
        
        IMU_Server__c server = new IMU_Server__c();
        server.Data_Center__c = dc.iD;
        server.Status__c = 'Active - Conigured';
        server.Monthly_Cost__c =56;
        server.RAM__c = 567;
        server.Main_IP__c = '456';
        server.CPU_Cores__c = 2;
        server.Main_Hostname__c = 'test';
        server.Hard_Disk_1__c = 44;
        server.Hard_Disk_2__c = 54;
        server.SSH_Password__c = '56777';
        server.SSH_Username__c = 'testty';
        server.Operating_System__c = 'Windows';
        server.MySQL_Password__c = '45666';
        
        server.Panel__c = 'Webmin';
        server.Postfix_Username__c = '456777';
        server.Postfix_Password__c = '456777';
        server.Postfix_Admin_URL__c = 'test';
        server.MTA_In__c = 'PMTA';
        server.MTA_Out__c = 'PMTA';
        server.MTA_URL__c = 'test';
        server.Notes__c = 'test';
        insert server;
        IMU_Logins__c login=new IMU_Logins__c();
        login.name='test';
        login.type__c='Registrar';
        login.username__c='test';
        login.password__C='pas11';
        login.status__C='Active';
        login.Login_URL__c='test.login.com';
        insert login;
        IMU_Domain__c domain=new IMU_Domain__c();
        domain.name='test.com';
        domain.Domain_Name__c='xyz.com';
        domain.Registrar__c=login.id;
        domain.Status__c='Active';
        domain.Purchase_Date__c=system.today();
        domain.Next_Renewal_Date__c=system.today()+5;
        insert domain;
        IMU_Clent__c client=new IMU_Clent__c();
        client.Name='test';
        client.Company__c='testcomp';
        client.Country__c='testcountry';
        client.Status_Date__c=system.now();
        client.Contact_Name__c='testCon';
        client.EMail__c='test@email.com';
        client.Phone__c='9999999999';
        insert client;
        IMU_Subscription__c subscription=new IMU_Subscription__c();
        subscription.name='testSub';
        subscription.Client__c=client.id;
        subscription.Status_Date__C=system.today();
        subscription.Status__c='Active';
        subscription.Chargify_Link__c='testurl.com';
        subscription.Type__c='IMU';
        subscription.X1st_Renewal_Date__c=system.today()+5;
        subscription.Monthly_Cost__c=33;
        insert subscription;
        IMU_SMTP__c smtp1=new IMU_SMTP__c();
        smtp1.Server__c=server.id;
        smtp1.Subscription__c=subscription.id;
        smtp1.Domain__c=domain.id;
        smtp1.IP__c='123.44.3.1';
        smtp1.Status__c ='To Configure';
        insert smtp1;
        listsm.add(smtp1);
        
        
        Test.setCurrentPage(Page.SMTP_Server_BulkChange);
        ApexPages.currentPage().getParameters().put('Id', server.id);
        ApexPages.StandardSetController stdController = new ApexPages.StandardSetController(listsm);
        //stdController.setSelected(smtp1);
        SMTP_Server_BulkChange contr = new SMTP_Server_BulkChange(stdController);
        // SMTP_Server_BulkChange contr = new SMTP_Server_BulkChange(new ApexPages.StandardController(smtp));
        contr.submit();
        contr.SelectAll();
        contr.DeSelectAll();
        contr.save();
        SMTP_Server_BulkChange.Imusmtp innerclass = new SMTP_Server_BulkChange.Imusmtp();
        innerClass.ischecked = true;
        
     }      

}

 

Thanks

Gopi

Hi  all,

 

i create a csv file using visualforce page, i got a csv file with some meta data and script code in csv file. how to get only with vfpage data in csv file 

 

my page:

 

<apex:page controller="AmbassadorNordic" sidebar="false" cache="true"
showHeader="false" contentType="{!if($CurrentPage.parameters.type !=null,
'text/csv#filename.csv',null)}">

<apex:form >

<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type" />
</head>

<apex:pageBlock >
<apex:commandButton value="accounts" action="{!account}"/>
<apex:outputText value="{!input}" escape="false"/>
</apex:pageBlock>
</apex:form>

</apex:page>

 

Thanks

gopikrishna

 

 Hi,

            

            image not displayed in <apex:image>, what i missing please help me.

 

Page:

 

<apex:repeat value="{!PlanData}" var="PlanData">
<apex:repeat value="{!PlanData}" var="plan_c">

 

<TR>
<TD CLASS = "pl_planIntro" ALIGN = "LEFT">
<DIV id="pl_animation" CLASS = "pl_slide" >
<!--<apex:outputField value="{!plan_c.Image1__c}" style="height:150px;width:205px"/>
<apex:outputField value="{!plan_c.Image2__c}" style="height:150;width:205"/>
<apex:outputField value="{!plan_c.Image3__c}" style="height:150;width:205"/ >
<apex:outputField value="{!plan_c.Image4__c}" style="height:150;width:205"/>-->
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image1__c}" />
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image2__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image3__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image4__c}"/>
</DIV>
<apex:outputText escape="false" value="{!plan_c.Planintro__c}"/>
</TD>
</TR>

 

       my calss:

 

       

public List<List<Plan__c>> getPlanData(){ // Plan_Details : get data of all unique plan name
String strName = ''; // plan name holder
List<Plan__c> tempPlan = new List<Plan__c> (); // temporary plan list
List<List<Plan__c>> lstPlanData = new List<List<Plan__c>>(); // list to be returned by this method

for(Plan__c plan_c : g_lstPlanDB){
if(tempPlan.size() == 1000){
lstPlanData.add(tempPlan);
tempPlan = new List<Plan__c>();
}

if(strName.compareTo(String.valueOf(plan_c.get('Name'))) <> 0){

String strImg1 = String.valueOf(plan_c.get('Image1__c')); // image 1

system.debug('ssssssssssss'+strImg1 );
if(strImg1 <> null) { strImg1 = strImg1.substring(33, 153); }
String strImg2 = String.valueOf(plan_c.get('Image2__c')); // image 2
if(strImg2 <> null) { strImg2 = strImg2.substring(33, 153); }
String strImg3 = String.valueOf(plan_c.get('Image3__c')); // image 3
if(strImg3 <> null) { strImg3 = strImg3.substring(33, 153); }
String strImg4 = String.valueOf(plan_c.get('Image4__c')); // image 4
if(strImg4 <> null) { strImg4 = strImg4.substring(33, 153); }
String strIntro = String.valueOf(plan_c.get('PlanIntro__c')); // plan intro
if(strIntro == null){ strIntro = '<BR/>'; }
if(strIntro.length() < 100){ strIntro = strIntro + '<BR/><BR/><BR/><BR/><BR/>'; }

system.debug(strImg1+'image1===');
// populate new Plan__c with desired data
Plan__c pc = new Plan__c( Id = String.valueOf(plan_c.get('Id')),
Name = String.valueOf(plan_c.get('Name')), // Name
Planintro__c = strIntro, // PlanIntro__c
Guestroomtype__c = String.valueOf(plan_c.get('Guestroomtype__c')), // Roomtype__c
Image1__c = strImg1, Image2__c = strImg2, // Image1__c and Image2__c
Image3__c = strImg3, Image4__c = strImg4 // Image3__c and Image4__c
);
// add Plan__c list to temporary list of plan
tempPlan.add(pc);
}


// update string value of plan name
strName = String.valueOf(plan_c.get('Name'));
}
// add temporary list values to new Plan__c list
lstPlanData.add(tempPlan);
// return list
return lstPlanData;
}

 

Thanks

Hi,

   

        i am using  <apex:images> component not displayed images why? what i missied please help me.      

 

       my vf page image:                

<DIV id="pl_animation" CLASS = "pl_slide" >
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image1__c}" />
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image2__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image3__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image4__c}"/>
</DIV>

 

and 

 

class:

 

String strImg1 = String.valueOf(plan_c.get('Image1__c')); 
if(strImg1 <> null) { strImg1 = strImg1.substring(33, 153); }
String strImg2 = String.valueOf(plan_c.get('Image2__c')); 
if(strImg2 <> null) { strImg2 = strImg2.substring(33, 153); }
String strImg3 = String.valueOf(plan_c.get('Image3__c')); 
if(strImg3 <> null) { strImg3 = strImg3.substring(33, 153); }
String strImg4 = String.valueOf(plan_c.get('Image4__c'));
if(strImg4 <> null) { strImg4 = strImg4.substring(33, 153); }

Plan__c pc = new Plan__c( Id = String.valueOf(plan_c.get('Id')), 
Image1__c = strImg1, Image2__c = strImg2, 
Image3__c = strImg3, Image4__c = strImg4 
);

 

 

Thanks 

 

Hi all,

 

          how to display list view with multiple standard objects in visual force page. 

 

I display only contact list views, but want display more than one standard object 

 

 

List Name List id

New This Week00B9000000464v7EAA
New Last Week00B9000000464vIEAQ
Platinum and Gold SLA Customers00B9000000464vZEAQ
Recently Viewed Accounts00B9000000464vhEAA
All Accounts00B9000000464viEAA
My Accounts00B9000000464vqEAA

 

so how to display multiple standard object list views 

 

my visual force page:

  

<apex:page standardController="contact" recordSetVar="contact" extensions="aaa">
<apex:pageBlock title="Account Lists">
<apex:form id="theForm">
<apex:pageBlockSection >
<apex:outputpanel >
<table class="list">

<tr>
<th >List Name</th>
<th>List id</th>
</tr>

<apex:repeat value="{!listviewoptions}" var="li">
<tr>
<td > <apex:outputText value="{!li.label}"></apex:outputText></td>
<td ><apex:outputText value="{!li.value}"></apex:outputText></td>
</tr>
</apex:repeat>

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

Hi all,

 

          how to display list view with multiple standard objects in visual force page. 

 

I display only contact list views, but want display more than one standard object 

 

 

List Name List id

New This Week00B9000000464v7EAA
New Last Week00B9000000464vIEAQ
Platinum and Gold SLA Customers00B9000000464vZEAQ
Recently Viewed Accounts00B9000000464vhEAA
All Accounts00B9000000464viEAA
My Accounts00B9000000464vqEAA

 

so how to display multiple standard object list views 

 

my visual force page:

  

<apex:page standardController="contact" recordSetVar="contact" extensions="aaa">
<apex:pageBlock title="Account Lists">
<apex:form id="theForm">
<apex:pageBlockSection >
<apex:outputpanel >
<table class="list">

<tr>
<th >List Name</th>
<th>List id</th>
</tr>

<apex:repeat value="{!listviewoptions}" var="li">
<tr>
<td > <apex:outputText value="{!li.label}"></apex:outputText></td>
<td ><apex:outputText value="{!li.value}"></apex:outputText></td>
</tr>
</apex:repeat>

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

Hi all,

 

        please response me any way to connect salesforce to lotus notes, i mean salesforce integration with lotus notes. please if you know share with me how to solve this.

 

Thanks you.

gopi 

Hi all,

 

       how to connect salesforce and lotus notes. Connect to loutes notes not available in my account. is there any way to connect to lotus notes

 

 

Thanks

Gopikrishna

Hi all,

 

    how to connect to lotus notes using salesforce. [salesforce integrate with lotus notes]

 

Thanks

Hi all,

 

          How to display vertical calendar in visualforce page. Please provide any links on this topic or code.

 

 

Thanks

Gopi

Hi all,

 

         how to migrate solve360 to salesforce contacts and leads.

 

 

Thanks

 

 

 

Hi all,

 

How to migrate salesforce to solve360 contacts and leads.

 

Thanks

    

Hi all, 

 

           How to display content when date is blank or empty in site.com page. i displayed using filters when date is equal to current date but i dont know when date field is blank that condition also display the content. 

 

Thanks 

Hi,

 

          where I create objects in site.com production account. This object useful for retrieve the dynamic data to site.com site, In production account  setup--> object--> custom object--> here no new object creation button for new custom object.  how to create new objects in site production account please help me. 

 

Thanks for advance 

Hi,

 

          where I create objects in site.com production account. This object useful for retrieve the dynamic data to site.com site, In production account  setup--> object--> custom object--> here no new object creation button for new custom object.  how to create new objects in site production account please help me. 

 

Thanks for advance 

Hi all,

 

          how to integrate salesforce with chaimp using http callouts, i created mail chimp api key, but what is end point url, where will i get end point url. and how to connect salesforce with mailchimp. 

 

 

Thank you

Hi

Based on account Record type or field type Accounts not visible in global search. for example if Account record type is "Lead Account" or field(check box) is true that records not visible in global search. if possible please guide me ?

Thanks
Gopikrishna
Hi all,

why Account Territory field not display in visualforce page,if possible please share me how to display territory field in vf page

Hi All,

 

How to migrate the data from one salesforce organization to another salesforce organization. Here first organization have Five custom objects with Look up Relationships, how to insert first organization object records  to second organization with out manual mapping between the objects(Relationship objects). Is this possible? If yes which tool is better for doing this work. Please guide me.

 

Thank you.

 Hi all,

I am unable to figure out how i can write test methods to cover code for red mark code.

Can any one point me in the right direction?

 

My Class and Test method :

 

public class SMTP_Server_BulkChange {
   
    public string serverid{get;set;}
    public List<IMU_SMTP__c> lstSMTP{get;set;}
    public IMU_SMTP__c SMTP{get;set;}
    public string checked_Item{get;set;}
    public boolean SMTPselected{get;set;}
    public boolean updateselected{get;set;}
    public IMU_SMTP__c SMTPnew{get;set;}
    
    public class Imusmtp
    {
     public boolean ischecked{set;get;}
     public IMU_SMTP__c Smtp{set;get;}
    }
    public list<Imusmtp> SMTPlist{set;get;}
    
    public SMTP_Server_BulkChange(ApexPages.StandardSetController stdController) {
    //--------- new code --------------------------------------------------
    
     serverid = apexpages.currentpage().getparameters().get('id');
      SMTPselected = true;
      updateselected = false;
       SMTPnew=new IMU_SMTP__c ();
       SMTPlist=new list<Imusmtp>();
     for(IMU_SMTP__c im:[select id,name,IP__c,Subscription__c,POP_Username__c,EMail__c,Status__c,Server__c,Status_Date__c,IMU_Client__c,Hourly_Speed_Limit__c from IMU_SMTP__c   where Server__c=:apexpages.currentpage().getparameters().get('id')])
     {
      Imusmtp Imu=new Imusmtp();
      Imu.smtp=im;
      Imu.ischecked=false;
      SMTPlist.add(imu);
     }
       
       //--------------------------------------------------------------------
       
      //  lstSMTP = new List<IMU_SMTP__c>();
       // SMTP = new IMU_SMTP__c();
                
     /*   for(sObject s:stdController.getSelected()){
            IMU_SMTP__c smtp = (IMU_SMTP__c)s;
            lstSMTP.add(smtp);
        }*/
        string s;
        for(Schema.FieldSetMember sf:sObjectType.IMU_SMTP__c.FieldSets.BulkChange_SMTP.getFields())
            s = s+sf.fieldPath + '   ';
            system.debug('#'+s);         
            
        
    }
    
     list<IMU_SMTP__c> imulist{set;get;}
     
      public void submit()
      {
       imulist=new list<IMU_SMTP__c>();
        for(Imusmtp im:SMTPlist)
        {
        if(im.ischecked==true)
        {
         IMU_SMTP__c ImS=im.smtp;
          imulist.add(imS);
        }
       }
      SMTPselected = false;
      updateselected = true;
        
      
      }
    
    
    public void SelectAll()
    {
     for(Imusmtp im:SMTPlist)
     {
     im.ischecked=true;
     }
    }
    public void DeSelectAll()
    {
     for(Imusmtp im:SMTPlist)
     {
     im.ischecked=false;
     }
    }
   
    public Pagereference save(){
        for(IMU_SMTP__c s:imulist){
            
            if(Checked_Item.contains('Status__c'))
                s.Status__c = SMTPnew.Status__c;
            if(Checked_Item.contains('Status_Date__c'))
                s.Status_Date__c= SMTPnew.Status_Date__c;
            if(Checked_Item.contains('IMU_Client__c'))
                s.IMU_Client__c= SMTPnew.IMU_Client__c;
            if(Checked_Item.contains('RBL_Status__c'))
                s.RBL_Status__c= SMTPnew.RBL_Status__c;
            if(Checked_Item.contains('DomainNameServer'))
                s.DNS__c= SMTPnew.DNS__c;
            if(Checked_Item.contains('Postfix_Inbox__c'))
                s.Postfix_Inbox__c= SMTPnew.Postfix_Inbox__c;
            if(Checked_Item.contains('rDNS__c'))
                s.rDNS__c= SMTPnew.rDNS__c;
            if(Checked_Item.contains('Postfix_Patch__c'))
                s.Postfix_Patch__c= SMTPnew.Postfix_Patch__c;
            if(Checked_Item.contains('SPF__c'))
            s.SPF__c= SMTPnew.SPF__c;
            if(Checked_Item.contains('PMTA__c'))
            s.PMTA__c= SMTPnew.PMTA__c;
            if(Checked_Item.contains('Sender_ID__c'))
            s.Sender_ID__c= SMTPnew.Sender_ID__c;
            if(Checked_Item.contains('Mirror__c'))
            s.Mirror__c= SMTPnew.Mirror__c;
            if(Checked_Item.contains('DMARC__c'))
            s.DMARC__c= SMTPnew.DMARC__c;
            if(Checked_Item.contains('FTP__c'))
            s.FTP__c= SMTPnew.FTP__c;
            if(Checked_Item.contains('DKIM__c'))
            s.DKIM__c= SMTPnew.DKIM__c;
            if(Checked_Item.contains('App_iMail__c'))
            s.App_iMail__c= SMTPnew.App_iMail__c;
            if(Checked_Item.contains('Catch_All__c'))
            s.Catch_All__c= SMTPnew.Catch_All__c;
            if(Checked_Item.contains('Interspire__c'))
            s.Interspire__c= SMTPnew.Interspire__c;
            if(Checked_Item.contains('POP_Username__c'))
            s.POP_Username__c= SMTPnew.POP_Username__c;
            if(Checked_Item.contains('POP_Password__c'))
            s.POP_Password__c= SMTPnew.POP_Password__c;
            if(Checked_Item.contains('FTP_Username__c'))
            s.FTP_Username__c= SMTPnew.FTP_Username__c;
            if(Checked_Item.contains('SMTP_Username__c'))
            s.SMTP_Username__c= SMTPnew.SMTP_Username__c;
            if(Checked_Item.contains('FTP_Password__c'))
            s.FTP_Password__c= SMTPnew.FTP_Password__c;
            if(Checked_Item.contains('SMTP_Password__c'))
            s.SMTP_Password__c= SMTPnew.SMTP_Password__c;
            if(Checked_Item.contains('Speed_Limit__c'))
            s.Speed_Limit__c= SMTPnew.Speed_Limit__c;
            if(Checked_Item.contains('DKIM_String__c'))
            s.DKIM_String__c= SMTPnew.DKIM_String__c;
            if(Checked_Item.contains('Notes__c'))
            s.Notes__c= SMTPnew.Notes__c;
           
        }
        update imulist;
        
        Pagereference Pageref;
        string RetId = ApexPages.CurrentPage().getParameters().get('id');
        Pageref = new PageReference('/' + '?Id=' + RetId );
        Pageref.setRedirect(true);
        return Pageref;
        
        
    }
    
    
    
  @isTest(seealldata=true)
    public static void testbulkchange(){
     list<IMU_SMTP__c> listsm = new list<IMU_SMTP__c>();
     list<IMU_SMTP__c> listsm1 = new list<IMU_SMTP__c>();
       IMU_Data_Center__c dc = new IMU_Data_Center__c();
        //dc.Data_Center__c = 'dc';
        dc.Status__c = 'Active';
        dc.Website__c = 'www.google.com';
        dc.Status_Date__c = system.now();
        dc.Billing_EMail__c = 'test@test.com';
        dc.Billing_Phone__c = '12345';
        dc.Support_Phone__c = '23456';
        dc.Support_EMail__c = 'test@test.com';
        dc.Contact_EMail__c = 'test@test.com';
        dc.Contact_Phone__c = '1234';
        dc.Abuse_EMail__c = 'test@test.com';
        dc.Name_on_Contract__c = 'test';
        dc.AS_Name__c = 'test';
        dc.Max_IPs_per_Server__c =2;
        dc.AS_Number__c = '44';
        dc.AS_Country__c = 'IN';
        dc.Contract_Terms__c = 'Month-to-Month';
        dc.IP_Assignment__c = 'multiple';
        dc.AS_Total_IPs__c = 44;
        dc.Provisioning_Time_Frame__c = '1 Day';
        dc.Base_Server_Price__c =44;
        dc.Support_Rating__c = 'Good';
        dc.Avg_Price_per_Extra_IP__c = 44;
        dc.Spam_Issue_Resolution__c ='test';
        dc.Setup_Fee_s__c = 78;
        dc.Notes__c = 'test';
        insert dc;
        
        IMU_Server__c server = new IMU_Server__c();
        server.Data_Center__c = dc.iD;
        server.Status__c = 'Active - Conigured';
        server.Monthly_Cost__c =56;
        server.RAM__c = 567;
        server.Main_IP__c = '456';
        server.CPU_Cores__c = 2;
        server.Main_Hostname__c = 'test';
        server.Hard_Disk_1__c = 44;
        server.Hard_Disk_2__c = 54;
        server.SSH_Password__c = '56777';
        server.SSH_Username__c = 'testty';
        server.Operating_System__c = 'Windows';
        server.MySQL_Password__c = '45666';
        
        server.Panel__c = 'Webmin';
        server.Postfix_Username__c = '456777';
        server.Postfix_Password__c = '456777';
        server.Postfix_Admin_URL__c = 'test';
        server.MTA_In__c = 'PMTA';
        server.MTA_Out__c = 'PMTA';
        server.MTA_URL__c = 'test';
        server.Notes__c = 'test';
        insert server;
        IMU_Logins__c login=new IMU_Logins__c();
        login.name='test';
        login.type__c='Registrar';
        login.username__c='test';
        login.password__C='pas11';
        login.status__C='Active';
        login.Login_URL__c='test.login.com';
        insert login;
        IMU_Domain__c domain=new IMU_Domain__c();
        domain.name='test.com';
        domain.Domain_Name__c='xyz.com';
        domain.Registrar__c=login.id;
        domain.Status__c='Active';
        domain.Purchase_Date__c=system.today();
        domain.Next_Renewal_Date__c=system.today()+5;
        insert domain;
        IMU_Clent__c client=new IMU_Clent__c();
        client.Name='test';
        client.Company__c='testcomp';
        client.Country__c='testcountry';
        client.Status_Date__c=system.now();
        client.Contact_Name__c='testCon';
        client.EMail__c='test@email.com';
        client.Phone__c='9999999999';
        insert client;
        IMU_Subscription__c subscription=new IMU_Subscription__c();
        subscription.name='testSub';
        subscription.Client__c=client.id;
        subscription.Status_Date__C=system.today();
        subscription.Status__c='Active';
        subscription.Chargify_Link__c='testurl.com';
        subscription.Type__c='IMU';
        subscription.X1st_Renewal_Date__c=system.today()+5;
        subscription.Monthly_Cost__c=33;
        insert subscription;
        IMU_SMTP__c smtp1=new IMU_SMTP__c();
        smtp1.Server__c=server.id;
        smtp1.Subscription__c=subscription.id;
        smtp1.Domain__c=domain.id;
        smtp1.IP__c='123.44.3.1';
        smtp1.Status__c ='To Configure';
        insert smtp1;
        listsm.add(smtp1);
        
        
        Test.setCurrentPage(Page.SMTP_Server_BulkChange);
        ApexPages.currentPage().getParameters().put('Id', server.id);
        ApexPages.StandardSetController stdController = new ApexPages.StandardSetController(listsm);
        //stdController.setSelected(smtp1);
        SMTP_Server_BulkChange contr = new SMTP_Server_BulkChange(stdController);
        // SMTP_Server_BulkChange contr = new SMTP_Server_BulkChange(new ApexPages.StandardController(smtp));
        contr.submit();
        contr.SelectAll();
        contr.DeSelectAll();
        contr.save();
        SMTP_Server_BulkChange.Imusmtp innerclass = new SMTP_Server_BulkChange.Imusmtp();
        innerClass.ischecked = true;
        
     }      

}

 

Thanks

Gopi

Hi,

   

        i am using  <apex:images> component not displayed images why? what i missied please help me.      

 

       my vf page image:                

<DIV id="pl_animation" CLASS = "pl_slide" >
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image1__c}" />
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image2__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image3__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image4__c}"/>
</DIV>

 

and 

 

class:

 

String strImg1 = String.valueOf(plan_c.get('Image1__c')); 
if(strImg1 <> null) { strImg1 = strImg1.substring(33, 153); }
String strImg2 = String.valueOf(plan_c.get('Image2__c')); 
if(strImg2 <> null) { strImg2 = strImg2.substring(33, 153); }
String strImg3 = String.valueOf(plan_c.get('Image3__c')); 
if(strImg3 <> null) { strImg3 = strImg3.substring(33, 153); }
String strImg4 = String.valueOf(plan_c.get('Image4__c'));
if(strImg4 <> null) { strImg4 = strImg4.substring(33, 153); }

Plan__c pc = new Plan__c( Id = String.valueOf(plan_c.get('Id')), 
Image1__c = strImg1, Image2__c = strImg2, 
Image3__c = strImg3, Image4__c = strImg4 
);

 

 

Thanks 

 

Hi all,

 

          how to display list view with multiple standard objects in visual force page. 

 

I display only contact list views, but want display more than one standard object 

 

 

List Name List id

New This Week00B9000000464v7EAA
New Last Week00B9000000464vIEAQ
Platinum and Gold SLA Customers00B9000000464vZEAQ
Recently Viewed Accounts00B9000000464vhEAA
All Accounts00B9000000464viEAA
My Accounts00B9000000464vqEAA

 

so how to display multiple standard object list views 

 

my visual force page:

  

<apex:page standardController="contact" recordSetVar="contact" extensions="aaa">
<apex:pageBlock title="Account Lists">
<apex:form id="theForm">
<apex:pageBlockSection >
<apex:outputpanel >
<table class="list">

<tr>
<th >List Name</th>
<th>List id</th>
</tr>

<apex:repeat value="{!listviewoptions}" var="li">
<tr>
<td > <apex:outputText value="{!li.label}"></apex:outputText></td>
<td ><apex:outputText value="{!li.value}"></apex:outputText></td>
</tr>
</apex:repeat>

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

Hi all,

 

        please response me any way to connect salesforce to lotus notes, i mean salesforce integration with lotus notes. please if you know share with me how to solve this.

 

Thanks you.

gopi 

Hi all,

 

          How to display vertical calendar in visualforce page. Please provide any links on this topic or code.

 

 

Thanks

Gopi

Hi,

 

          where I create objects in site.com production account. This object useful for retrieve the dynamic data to site.com site, In production account  setup--> object--> custom object--> here no new object creation button for new custom object.  how to create new objects in site production account please help me. 

 

Thanks for advance 

Hi all 

 

             How to get attachment from salesforce attachments in site.com page. 

 

Thanks 

 

Hi all 

 

           How to create pagination in site.com please response me this possible or not?

 

Thank you.

Hi all,

 

 

            what is production sandbox and test sandbox(difference)?  which url using for production sandbox?

 

 

Thanks

gopikrishna

 

Hi all,

 

     please give me replay for this,

 

                  I am using site.com sandbox, when I open that sandbox with credentials,after click site.com tab, the site.com studio not opened and I got "Site.com is not currently supported on test instances."  what is this i don't know about site.com sandbox and we develop the site in site.com

 

please help me this urgent

 

Thanks

 

Hi,

 

      i have created custom button on custom object,  that button visible all user detail page but  that button not visible to other user detail page. only one user visible and other user need not see that button.

 

Thank you.