• Karthik TathiReddy
  • NEWBIE
  • 5 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 18
    Replies
Hi Folks,
I had an issue with the default settings for partner portal in my sandbox org. Below is an system generated message when I click on "Set Default Email Templates for All Portals".

User-added image

Previously I used my own visualforce template for "New User Template" section in below section.
User-added image
I reverted back with the default email template later. But when I try to click on "Set Default Email Templates for All Portals" it showing as data not available. How can I access this link? Please help me on this friends. Any ideas/solutions could be appreciated.

Thanks & Regards,
Shiva Kumar

Hi buddies...

I have an urgent requirement to display more than thousand records in visualforce page without using readonly="true" attribute.

If I use readonly="true" I don't have ability to use dml operations on the page... How could I achieve this with out using that attribute?

Hi,

I am using a check box and passing many param id's for the check box to the controller which is assigned to the multiple values corresponding to the different params. While I am using the assigned values in different methods in the controller, I am getting null values in the debug logs/ console.

 

Could any one help with your ideas how do I use them in different methods through out the controller....

<apex:outputPanel id="repeatList">
           <apex:repeat var="vw" value="{!VenuesWrapper}">
	<!-- Accordion Start -->			
	 <div class="accorden_bdr">
                    <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons" role="tab" id="ui-accordion-2-header-3" aria-controls="ui-accordion-2-panel-3" aria-selected="false" tabindex="-1">{!vw.venue.MD_Locations_Serviced__r.name}<apex:outputPanel id="recomendationcreatedStatus" rendered="{!IF(vw.isRequestSent,'true','false')}">
                            <div class="refferal_color bold tab_pad">Referral Sent</div></apex:outputPanel> </h3>
                    <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" id="ui-accordion-2-panel-3" aria-labelledby="ui-accordion-2-header-3" role="tabpanel" aria-expanded="false" aria-hidden="true" style="display: none;">
                        <div class="refer_divm">
                            <div class="refer_couple" style="color: #d7666a;">Check "Refer to Couple" to send this pricing information with this Venue.>></div>

			 <div class="refer_chkbox">

			<!-- Outputpanel start for checkbox region -->                           
                                 <apex:outputPanel id="recomendationNotcreated" rendered="{!IF(AND(vw.venue.Recommendations__r !=null && vw.venue.Recommendations__r.size==0), 'true', 'false')}">
            					   <apex:form id="ReferToCouple">   
                                    <apex:outputLabel value="REFER TO COUPLE" for="referLabel"/>
                                     <apex:inputCheckbox value="{!vw.isReferCoupleRefered}" id="referLabel" styleClass="referLabel">
                                        <apex:actionSupport event="onclick" action="{!createRecomendation}" rerender="headerComponent,repeatList,recomendationcreated" status="loading">
                                          <apex:param name="vid" value="{!Venue_DB__c.id}" assignTo="{!venueRefId}"/>
                                          <apex:param name="venueRefd" value="{!vw.venue.id}" assignTo="{!venuePricingInfoRefId}"/>
                                          <apex:param name="locservice" id="locservice" value="{!vw.venue.MD_Locations_Serviced__c}" assignTo="{!locationServicedRefId}"/>
                                        </apex:actionSupport>
                                        <apex:actionStatus id="loading">
                                          <apex:facet name="start">
                                            <div class="loading lext"></div>
                                              <div class="innerBlock">
                                                <img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
                                              </div>
                                          </apex:facet>
                                        </apex:actionStatus>
                                     </apex:inputCheckbox>
                                  </apex:form>
                                </apex:outputPanel>
			<!-- Outputpanel end for checkbox region -->                           

                        <!-- Outputpanel start for Remove link region -->
                                 <apex:outputPanel id="recomendationcreated" rendered="{!IF(AND(vw.venue.Recommendations__r !=null && vw.venue.Recommendations__r.size!=0), 'true', 'false')}">
                                  <apex:form id="RemoveToCouple"> 
                                    <!--  Testing -->
                                    <!-- {!vw.venue.id} -->
                                    <!--  Testing -->
                                        <apex:commandLink styleClass="clearRefer Remove" value="Remove" action="{!deleteRecomendation}" rerender="headerComponent,repeatList" status="loadingStatus">
                                         <apex:param name="dvid" value="{!vw.venue.id}" assignTo="{!venueRefId}"/>
                                        </apex:commandLink>
                                        <apex:actionStatus id="loadingStatus" startText=" (loading...)" stopText="">
                                          <apex:facet name="start">
                                            <div class="loading lext"></div>
                                            <div class="innerBlock">
                                              <img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
                                            </div>
                                          </apex:facet>
                                        </apex:actionStatus>
                                  </apex:form>
                                </apex:outputPanel>
                        <!-- Outputpanel end for Remove link region -->

                            </div>
                          </div>
                        <div style="width:100%; float:left;">
         
                                  <div class="bold ceremony_start" style="margin-top: 13px;">Ceremony Starting Price Includes</div>
                                    <div class="number_div"><apex:outputPanel id="cerPriceIncludes" rendered="{!IF(vw.venue.Ceremony_Starting_Price_Includes__c==null || vw.venue.Ceremony_Starting_Price_Includes__c=='', true,false)}">n/a</apex:outputPanel><apex:outputField value="{!vw.venue.Ceremony_Starting_Price_Includes__c}"/></div>

                               <div class="bold" style="color:#50332A; width: 47%; float: left !important;">Price Description</div><br/>
                                <apex:outputPanel id="priceDescp" rendered="{!IF(vw.venue.Price_Description__c==null || vw.venue.Price_Description__c=='', true,false)}">n/a</apex:outputPanel><apex:outputField value="{!vw.venue.Price_Description__c}" />
                                 
                        </div>

                                <div class="padtop_mini bold" style="color:#50332A; padding-top: 10px;width: 100%;float: left;">Packages</div>
                  <table>
                  <tr>
                  <td><b><apex:outputPanel id="packOffered" rendered="{!IF(vw.venue.Packages_Offered__c==null || vw.venue.Packages_Offered__c=='', true,false)}">n/a</apex:outputPanel><apex:outputField value="{!vw.venue.Packages_Offered__c}" /></b></td>
                  <td>Packages Offered?</td>
                  </tr>
                  </table>
                    </div>
                   </div>

		<!-- Accordion End -->
           </apex:repeat>          </apex:outputPanel>

 

I have a check box written using stylesheets for displaying as accordions in a apex:repeat method. This would generate multiple accordions and the same checkbox for every accordion. The VF code is shown above...

 

I need to render the remove link section when I click on checkbox and need to render the checkbox region when clicked on remove link. The functionlity is working if I refresh the page when I Perform actions on the two regions.

I need to work the functionality when i click on the checkbox and remove link without manually refreshing the page.

Any ideas please post your comments....

 

I have two fields named Primarypicture__c and SecondaryPictures__c which was the image urls. PrimaryPicture__c has single image url of data type URL and the SecondaryPictures__c has multiple image url's seperated by semicolon which is Long Text Area data type.

 

Now I want to display both the fileds as image slider in VF page where primarypicture__c should be defalut image and the secondaryPictures__c were to be the next to the primaryPicture__c image in the image slider slide show.

 

Can any one please post your suggestions or any sample code on how I could achieve this.....

How to display list of account addresses in google maps using numbered markers. I need to display the list of account addresses displaying on the page using apex:repeat which is set to 6 records per page. If I click on the address field on the list of records the marker should pop up in the map. Please suggest me how I can  achieve this.... Any suggestions or sample code please post your comments.

HI,

I wrote onclick function for a span tag as below

<div class="property_in"><img src="'+hurl+'" width="210" height="138" /><div class="property_title">'+val1+'<br /><span class="property_remove"><p onclick="remove(\''+ivid+'\');" style="cursor: pointer;">Remove</p></span></div></div>

 

Onclick the image should remove from the page. But the above one is not working for Chrome and IE browsers. Please give some idea how to work this on chrome and IE as well...

Hi,

I didnot find work.com in my org to enable. How can I find that and enable in my organisation? Please any ideas could be appreciated...

Hi,

Can we add/create new custom fields to the standard objects by writing apex class... If possible please give me a sample code..........

 

 

 

 

Thanks,

 

 

 

 

-Shiva

 

Hi,

Is there any possiblity to customize the Notes object? I need to add some custom fields for the Notes object. Is this possible through coding? Please give me some possible ways for this.....

 

 

 

 

 

 

Thanks

 

 

 

-Shiva

Hi,

I enabled delegated authentication for my salesforce organisation, now its saying single sign on is invalid for your organisation.
Contact your administrator. When I request to reset my password the url in my mail is showing that can not reset password

for single sign on users.

How could I reset password for my organisation.? Please help me out from this problem?

Hi,

What is the https://c.cs14.visual.force.com represents for my salesforce organisation. What is its environment. Any why the domain url is changing to https://c.cs14.visual.force.com when I open any visualforce page.

Please let me know why is this changing and what exactly it denotes?

 

 

Thanks

 

 

-Shiva

Hi,

I created a visualforce standardcontroller page with extension controller.

Here I used Opportunity as the parent object and another custom object as child to the opportunity.

In the custom object I have a look up field. Whiile give the field values of custom object in visualforce page and saving it, It is not saving the value of lookup field.

The sample code in visualforce page is shown below.

Page:

<apex:inputField value="{!Opportunity.ChildObject__r.name}">

<apex:inputField value="{!Opportunity.ChildObject__r.email__c}">

<apex:inputField value="{!Opportunity.ChildObject__r.Contact__c}">(this is the lookup field)

<apex:commandButton value="Save" action="{!Save}">

Here after clicking the save button the contact lookup field is not saving...

Can you reply me how to get save the lookup field.

Hi,

Can any1 tell me flow of single sign on delegated authentication for facebook and linkedin. I tried with the federated single sign on for facebook. But, it is asking login credentials though i followed the turorials from salesforce. Please tell me the proper approach how to use single sign on successfully for facebook or linkedin with out asking login credentials when we click on the tab/button of the service provider. Any suggestions/soultions could be appreciated......

 

-Thanks

Shiva

Hi,

Is there any method in Apex to print the the given input number in 4 digit format. For example my input numbers are 2,3,4,5,6,23,24. Then the output should be like 0002,0003,0004,0005,0006,0023,0024.

How could I achieve this with out writing general logic? If any methods resulting this output could appreciate. Please help on this....

 

 

Regards-

Shiv Kumar

Hi,

I have done all configuration settings for single sign on settings for facebook in my salesforce organisation. But the only Federaion ID is left to find. In user information the Federaion Id value is null by default. How could I find that Federation Id and  put in the user personal information to access single sign on feature.....? Any one who have done this please reply to this post ... :( 

Hi,

I enabled Single sign on in my salesforce creating a certificate, domain(Identity Provider), Authenticate Provider(Facebook), and configured settings of single sign on. After doing all those in the app menu The name I given in service provider(FaceBook) displaying in app menu. After clicking the FaceBook its directing to facebook but asking facebook credentials. The following are the snapshots of my SSO flow. Where can I find the SAML Assertion code for facebook authentication to validate it. Please suggest me.

SSO Settings

Auth. Provider

Identity Provider

 

Service Provider

Hi buddies,

I don't know why some features we are unable to use in salesforce. I would like to add live agent to a package in salesforce. How could i add the salesforce features to the package. I want to upload live agent skills, configuration settings, chat buttons etc regarding live agent. Please give any solution or reason why we are unable to add them to the package????????????

***********Controller***********
public with sharing class TitleListModified { 
	
        public Program__c Program;
	
        public List<Wrapper> wraplist{get;set;}
	
        public TitleListModified(ApexPages.StandardController controller) { 
	
        program = (Program__c) Controller.getRecord(); 
        
        wraplist = new List<Wrapper>(); 
	
        for(Title__c t1 : [SELECT id,name,Program__c FROM Title__c where Program__c != :program.Id]){ 

	    wraplist.add( new wrapper(t1)); 

		} 
	} 

    public class Wrapper{ 

	public Boolean Selected{get;set;} 

	public title__c title{get;set;} 

			public wrapper(Title__c ti){ 

				title = ti; 
				} 
			} 

        public PageReference addTitle(){ 

		List<Title__c> newTitle = new List<Title__c>(); 

		for(Wrapper wrap :WrapList){ 

			if(Wrap.Selected){ 

				wrap.title.Program__c = program.Id; 

				newTitle.add(wrap.title); 

				} 

			} 

		update newtitle;	 

		PageReference programPage = new ApexPages.StandardController(program).view(); 		

       		programPage.setRedirect(true); 

             return programPage; 

				} 

			}


*************VF Page***************

<apex:page StandardController="Program__c" extensions="TitleListModified">
<apex:form >
  <apex:pageBlock >
  <apex:pageBlockButtons >
  <apex:commandButton action="{!addTitle}" value="Add Title" />
  </apex:pageBlockButtons>
  <apex:pageBlockSection >
  <apex:pageBlockTable value="{!WrapList}" var="w">
  <apex:column headerValue="Action">
  <apex:inputCheckbox value="{!w.Selected}"/>
  </apex:column>
  <apex:column value="{!w.title.name}"/>
  </apex:pageBlockTable>
  </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>

 Hi,

The above page and controller is to add records from the child object "Title" to the related list of "Program" object record. For this process I created a Button for Title__c object and added that button to the program related list. To the button I gave this page url. 

 

Now the thing is when I delete any record from the related list which added from the title object throught the button those records are being deleted from the title object also. What logic could over come this? Please help me out... 

**************Controller*************
public with sharing class ProgramController {

     public Program__c Program;

     public List<Wrapper> wraplist{get;set;}
 
     public ProgramController(ApexPages.StandardController controller) {

       program = (Program__c) Controller.getRecord();
 
       wraplist = new List<Wrapper>();
        
       Set<string> titlestr = new set<string>();
    
       List<Title__c> PTLst = [SELECT id, name, Program__c FROM Title__c  where Program__c = :program.id];

       for(Title__c r : PTLst){

          titlestr.add(r.name);

         }

       List<Title__c>  t = [SELECT id,name,Program__c FROM Title__c  where Name not in :titlestr limit 20];

    // List<title__c> t = [SELECT id,name,Program__c FROM Title__c LIMIT 20];

      for(title__c t1 : t){

         wraplist.add( new wrapper(t1));

         }
 
       }

public class Wrapper{
    
    public Boolean Selected{get;set;}
    
    public title__c title{get;set;}
    
    public wrapper(Title__c ti){
    
       title = ti;
    
      }
   }

   public PageReference addTitle(){

      List<Title__c> newTitle = new List<Title__c>();
    
        for(Wrapper wrap :WrapList){
    
           if(Wrap.Selected == true){
    
             title__c newtitle1 = new title__c(Name = wrap.title.name, program__c=program.id);
    
             newTitle.add(newTitle1);
    
           upsert newtitle1;
    
           }
    
         }

      PageReference programPage = new ApexPages.StandardController(program).view();
    
      programPage.setRedirect(true);
    
      return programPage;

    }

}



******************VF Page*******************

<apex:page StandardController="Program__c" extensions="ProgramController">
<apex:form >
  <apex:pageBlock >
  <apex:pageBlockButtons >
  <apex:commandButton action="{!addTitle}" value="Add Title"/>
  </apex:pageBlockButtons>
  <apex:pageBlockSection >
  <apex:pageBlockTable value="{!WrapList}" var="w">
  <apex:column headerValue="Action">
  <apex:inputCheckbox value="{!w.Selected}"/>
  </apex:column>
  <apex:column value="{!w.title.name}"/>
  </apex:pageBlockTable>
  </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>

 The above visualforce page I created a button and assigned the VFpage to the buttonURL to the parent object Program__c. Title__c is the title object. The above code results in adding the selected records to the related list of a program__c record. In this process what ever the records I added from the Title object the same records creating again in the title object which resulting to duplicate records. Please help me out regarding this.

Hi All,

I have installed Gantt Chart application from AppExchange but when I am trying to access getting the issue like  "[Invalid key value "[object Object]" in [object:vm undefined (44)]. Key must be a string or number.]"
Please suggest or help to me to overcome this issue.

Regards,
Aparna
Trailhead Module 3:  Create a formula field that determines the number of days between today and the last activity date for a case's account.
Your support team has asked for improved visibility on account activity level at the time they’re helping with customer issues. Specifically, when they’re looking at a case, they’d like to see an at-a-glance view of the number of days since the case’s related account was last active. Create the formula using these requirements.The formula should be on the Case object.
The formula should be of return type Number.
The formula should be named 'Days Since Last Update' and have a resulting API Name of 'Days_Since_Last_Update__c'.
The formula should return the number of days between the account’s Last Activity Date and today.

I created the following:

I created a new custom formula field with return type number and called Days Since Last Update.
I created this formula: Account.LastActivityDate - TODAY()

I get this error message:

Challenge not yet complete... here's what's wrong: 
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today

Can you please assist what I did wrong?  I'm not sure if my formula is even correct with the challenge.  Please help!

Thank you.

Please help me. Becuase im very new to sales force. how i can solve this problem

global with sharing class SaveExpenditureWebService {

webservice static Expenditure__c createExpenditure(Decimal amount,String expName, String paidByName )
{

Expenditure__c c = new Expenditure__c();
Person__c p = [Select p.Name From Person__c p Where Name = :paidByName limit 1];
c.Amount__c = amount;
c.Name__c = expName;
c.Exp_Date__c = Date.today();
c.Paid_By__c = p.Id;
insert c;
return c;
}

}

Hi,

I am using a check box and passing many param id's for the check box to the controller which is assigned to the multiple values corresponding to the different params. While I am using the assigned values in different methods in the controller, I am getting null values in the debug logs/ console.

 

Could any one help with your ideas how do I use them in different methods through out the controller....

<apex:outputPanel id="repeatList">
           <apex:repeat var="vw" value="{!VenuesWrapper}">
	<!-- Accordion Start -->			
	 <div class="accorden_bdr">
                    <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons" role="tab" id="ui-accordion-2-header-3" aria-controls="ui-accordion-2-panel-3" aria-selected="false" tabindex="-1">{!vw.venue.MD_Locations_Serviced__r.name}<apex:outputPanel id="recomendationcreatedStatus" rendered="{!IF(vw.isRequestSent,'true','false')}">
                            <div class="refferal_color bold tab_pad">Referral Sent</div></apex:outputPanel> </h3>
                    <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" id="ui-accordion-2-panel-3" aria-labelledby="ui-accordion-2-header-3" role="tabpanel" aria-expanded="false" aria-hidden="true" style="display: none;">
                        <div class="refer_divm">
                            <div class="refer_couple" style="color: #d7666a;">Check "Refer to Couple" to send this pricing information with this Venue.>></div>

			 <div class="refer_chkbox">

			<!-- Outputpanel start for checkbox region -->                           
                                 <apex:outputPanel id="recomendationNotcreated" rendered="{!IF(AND(vw.venue.Recommendations__r !=null && vw.venue.Recommendations__r.size==0), 'true', 'false')}">
            					   <apex:form id="ReferToCouple">   
                                    <apex:outputLabel value="REFER TO COUPLE" for="referLabel"/>
                                     <apex:inputCheckbox value="{!vw.isReferCoupleRefered}" id="referLabel" styleClass="referLabel">
                                        <apex:actionSupport event="onclick" action="{!createRecomendation}" rerender="headerComponent,repeatList,recomendationcreated" status="loading">
                                          <apex:param name="vid" value="{!Venue_DB__c.id}" assignTo="{!venueRefId}"/>
                                          <apex:param name="venueRefd" value="{!vw.venue.id}" assignTo="{!venuePricingInfoRefId}"/>
                                          <apex:param name="locservice" id="locservice" value="{!vw.venue.MD_Locations_Serviced__c}" assignTo="{!locationServicedRefId}"/>
                                        </apex:actionSupport>
                                        <apex:actionStatus id="loading">
                                          <apex:facet name="start">
                                            <div class="loading lext"></div>
                                              <div class="innerBlock">
                                                <img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
                                              </div>
                                          </apex:facet>
                                        </apex:actionStatus>
                                     </apex:inputCheckbox>
                                  </apex:form>
                                </apex:outputPanel>
			<!-- Outputpanel end for checkbox region -->                           

                        <!-- Outputpanel start for Remove link region -->
                                 <apex:outputPanel id="recomendationcreated" rendered="{!IF(AND(vw.venue.Recommendations__r !=null && vw.venue.Recommendations__r.size!=0), 'true', 'false')}">
                                  <apex:form id="RemoveToCouple"> 
                                    <!--  Testing -->
                                    <!-- {!vw.venue.id} -->
                                    <!--  Testing -->
                                        <apex:commandLink styleClass="clearRefer Remove" value="Remove" action="{!deleteRecomendation}" rerender="headerComponent,repeatList" status="loadingStatus">
                                         <apex:param name="dvid" value="{!vw.venue.id}" assignTo="{!venueRefId}"/>
                                        </apex:commandLink>
                                        <apex:actionStatus id="loadingStatus" startText=" (loading...)" stopText="">
                                          <apex:facet name="start">
                                            <div class="loading lext"></div>
                                            <div class="innerBlock">
                                              <img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
                                            </div>
                                          </apex:facet>
                                        </apex:actionStatus>
                                  </apex:form>
                                </apex:outputPanel>
                        <!-- Outputpanel end for Remove link region -->

                            </div>
                          </div>
                        <div style="width:100%; float:left;">
         
                                  <div class="bold ceremony_start" style="margin-top: 13px;">Ceremony Starting Price Includes</div>
                                    <div class="number_div"><apex:outputPanel id="cerPriceIncludes" rendered="{!IF(vw.venue.Ceremony_Starting_Price_Includes__c==null || vw.venue.Ceremony_Starting_Price_Includes__c=='', true,false)}">n/a</apex:outputPanel><apex:outputField value="{!vw.venue.Ceremony_Starting_Price_Includes__c}"/></div>

                               <div class="bold" style="color:#50332A; width: 47%; float: left !important;">Price Description</div><br/>
                                <apex:outputPanel id="priceDescp" rendered="{!IF(vw.venue.Price_Description__c==null || vw.venue.Price_Description__c=='', true,false)}">n/a</apex:outputPanel><apex:outputField value="{!vw.venue.Price_Description__c}" />
                                 
                        </div>

                                <div class="padtop_mini bold" style="color:#50332A; padding-top: 10px;width: 100%;float: left;">Packages</div>
                  <table>
                  <tr>
                  <td><b><apex:outputPanel id="packOffered" rendered="{!IF(vw.venue.Packages_Offered__c==null || vw.venue.Packages_Offered__c=='', true,false)}">n/a</apex:outputPanel><apex:outputField value="{!vw.venue.Packages_Offered__c}" /></b></td>
                  <td>Packages Offered?</td>
                  </tr>
                  </table>
                    </div>
                   </div>

		<!-- Accordion End -->
           </apex:repeat>          </apex:outputPanel>

 

I have a check box written using stylesheets for displaying as accordions in a apex:repeat method. This would generate multiple accordions and the same checkbox for every accordion. The VF code is shown above...

 

I need to render the remove link section when I click on checkbox and need to render the checkbox region when clicked on remove link. The functionlity is working if I refresh the page when I Perform actions on the two regions.

I need to work the functionality when i click on the checkbox and remove link without manually refreshing the page.

Any ideas please post your comments....

 

HI,

I wrote onclick function for a span tag as below

<div class="property_in"><img src="'+hurl+'" width="210" height="138" /><div class="property_title">'+val1+'<br /><span class="property_remove"><p onclick="remove(\''+ivid+'\');" style="cursor: pointer;">Remove</p></span></div></div>

 

Onclick the image should remove from the page. But the above one is not working for Chrome and IE browsers. Please give some idea how to work this on chrome and IE as well...

Hi, I am not able to login to force.com com ide for my Sandbox org. I am able to login into my sandbox through browser with same credentials. Tried to login by resetting my security token also. But still couldnt get it.

 

The error getting shown is,

 

Unable to connect to hostname 'test.salesforce.com'

Inavlid username, password, security token; or user locked out.

Please verify and/or change your credentials.

Hi,

What is the https://c.cs14.visual.force.com represents for my salesforce organisation. What is its environment. Any why the domain url is changing to https://c.cs14.visual.force.com when I open any visualforce page.

Please let me know why is this changing and what exactly it denotes?

 

 

Thanks

 

 

-Shiva

Hi,

I created a visualforce standardcontroller page with extension controller.

Here I used Opportunity as the parent object and another custom object as child to the opportunity.

In the custom object I have a look up field. Whiile give the field values of custom object in visualforce page and saving it, It is not saving the value of lookup field.

The sample code in visualforce page is shown below.

Page:

<apex:inputField value="{!Opportunity.ChildObject__r.name}">

<apex:inputField value="{!Opportunity.ChildObject__r.email__c}">

<apex:inputField value="{!Opportunity.ChildObject__r.Contact__c}">(this is the lookup field)

<apex:commandButton value="Save" action="{!Save}">

Here after clicking the save button the contact lookup field is not saving...

Can you reply me how to get save the lookup field.

**************Controller*************
public with sharing class ProgramController {

     public Program__c Program;

     public List<Wrapper> wraplist{get;set;}
 
     public ProgramController(ApexPages.StandardController controller) {

       program = (Program__c) Controller.getRecord();
 
       wraplist = new List<Wrapper>();
        
       Set<string> titlestr = new set<string>();
    
       List<Title__c> PTLst = [SELECT id, name, Program__c FROM Title__c  where Program__c = :program.id];

       for(Title__c r : PTLst){

          titlestr.add(r.name);

         }

       List<Title__c>  t = [SELECT id,name,Program__c FROM Title__c  where Name not in :titlestr limit 20];

    // List<title__c> t = [SELECT id,name,Program__c FROM Title__c LIMIT 20];

      for(title__c t1 : t){

         wraplist.add( new wrapper(t1));

         }
 
       }

public class Wrapper{
    
    public Boolean Selected{get;set;}
    
    public title__c title{get;set;}
    
    public wrapper(Title__c ti){
    
       title = ti;
    
      }
   }

   public PageReference addTitle(){

      List<Title__c> newTitle = new List<Title__c>();
    
        for(Wrapper wrap :WrapList){
    
           if(Wrap.Selected == true){
    
             title__c newtitle1 = new title__c(Name = wrap.title.name, program__c=program.id);
    
             newTitle.add(newTitle1);
    
           upsert newtitle1;
    
           }
    
         }

      PageReference programPage = new ApexPages.StandardController(program).view();
    
      programPage.setRedirect(true);
    
      return programPage;

    }

}



******************VF Page*******************

<apex:page StandardController="Program__c" extensions="ProgramController">
<apex:form >
  <apex:pageBlock >
  <apex:pageBlockButtons >
  <apex:commandButton action="{!addTitle}" value="Add Title"/>
  </apex:pageBlockButtons>
  <apex:pageBlockSection >
  <apex:pageBlockTable value="{!WrapList}" var="w">
  <apex:column headerValue="Action">
  <apex:inputCheckbox value="{!w.Selected}"/>
  </apex:column>
  <apex:column value="{!w.title.name}"/>
  </apex:pageBlockTable>
  </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>

 The above visualforce page I created a button and assigned the VFpage to the buttonURL to the parent object Program__c. Title__c is the title object. The above code results in adding the selected records to the related list of a program__c record. In this process what ever the records I added from the Title object the same records creating again in the title object which resulting to duplicate records. Please help me out regarding this.