• pq100
  • NEWBIE
  • 25 Points
  • Member since 2011

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

I went on the Dev 501 apex training course a while back, but at the time i forgot to transfer the org we used on the course to a new development environment. As a result my training org has now expired.

I still have the files locally in eclipse, so my question is: is there a way to deploy the expired org from eclipse to a new developer org in one hit?

Thanks for any suggestions.
Paul
  • August 28, 2012
  • Like
  • 0
Hi

I have a component in C# i'm using for SF integration which all works fine. I currently have a custom C# login screen which uses the entered values to retrieve the SessionID.

However, i'd like to set it up so that if the user is already logged on to Salesforce through a browser then i can retrieve the SessionId from that session and so skip the login process. Any ideas if this is possible and if so how i go about it?

Thanks for any suggestions
Paul
  • August 16, 2012
  • Like
  • 0

Hi

 

I have a VB app that i'm migrating to Force.com, in this app i created a custom function to calculate the straight line distance bewteen 2 points (specified using British national Grid coordinates):

 

Function StraightLineDist(x1 As Double, y1 As Double, x2 As Double, y2 As Double) As Double
xDiff = x1 - x2
yDiff = y1 - y2

xSqrt = xDiff * xDiff
ySqrt = yDiff * yDiff
StraightLineDist = Sqr(xSqrt + ySqrt) / 1000
End Function

 

using this i could take a point that a user had added and then query a seperate object to pull out, for example, all points within 5km.

 

Does anyone know if its possible to achieve somethign similar with Apex, if so i'd appreciate any pointers you can give me!

 

Thanks

Paul

 

  • April 03, 2012
  • Like
  • 0

Hi All

 

I've embedded a Google map in a visualforce page and am using an ajax query/javascript to display all the points from a custom object as markers on the map.

 

This was all working as expected until i did a bulk delete of a number of records from that custom object using the excel connector. After the delete, the deleted records are still being displayed on the map, however, if you query the object using the IDE the records have as expected been deleted.

 

Any ideas what is going on here!?

Thanks for any suggestions.

Paul

  • March 09, 2012
  • Like
  • 0

Hi

 

I'm using an extension to display data from the parent record (Site__c) on my VF page, this works correctly when i click on an existing record (Investment__c) in the related list, however, when i add a new Investment__c i get the following error:

 

System.QueryException: List has no rows for assignment to SObject

 

I'm guessing this is becausethe Id isn't available at this point ofr the new record. So does anyoneknow how i can get round this?

 

Code excerpt  below, Thanks for any suggestions!

Paul

 

	//get data from Parent Object
        Investment__c inv = (Investment__c)stdController.getRecord();
        
    	inv = [Select ID, Site__r.Address__c, Site__r.Postcode__c, Site__r.Town__c from Investment__c
    			where id=:stdController.getRecord().Id limit 1];
    			
    	SiteObj = inv.Site__r;
    //////

 

 

  • March 01, 2012
  • Like
  • 0

Hi All

 

I need to get a list of days between a start and end date, as a test i've tried using the following but it doesn't produce any results (no error message either). Any ideas how i can achieve this?

 

Date startDate = date.newinstance(2010, 01, 01);
Date endDate = date.newinstance(2011, 01, 01);
               
        for (Date d = startDate; d.isSameDay(endDate) ; d.addDays(1))
        {
            system.debug(d);
        }

 Thanks for any ideas.

Paul

  • September 23, 2011
  • Like
  • 0

Hi All

 

I've got a visualforce page with a couple of pageblocksections (see code below), the first has 2 cols the 2nd has 3, currently the 3rd column on the second section is squashed up against the right hand side of the screen.

 

what i'd like is for the 3rd column of the second pageblocksection to start where the 2nd column of the first pageblocksection starts. I've tried essing around with the Style settings and after a lot of messing around got it to work using position:absolute but then realised it doesn't resize when the window resizes. getting fairly fustrated!

 

Hopefully the above makes sense and thanks to anyine whio can help me with this!

Cheers

Paul

 

        <apex:pageBlockSection showHeader="true" title="Parties" columns="2">
            <apex:outputField value="{!Rental_Evidence__c.Landlord__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Landlords_Agent__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Tenant__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Tenants_Agent__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Arbitrator_Expert__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.X3rd_Party_Name__c}" style="width: 100%;"/>
        </apex:pageBlockSection>
        
        

        <apex:pageBlockSection showHeader="true" title="Allowances" columns="3" >


            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Assumed Term" for="assumed" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Assumed_Term__c}" id="assumed"  styleClass="blank"/>
            </apex:pageBlockSectionItem> 
            
            
          
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Yrs"/>
                <apex:outputField value="{!Rental_Evidence__c.Assumed_Term_Yrs__c}" id="assumedYrs" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
           
 
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="assumedcoms" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Assumed_Term_Comments__c}" id="assumedcoms" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Rent Review Pattern" for="RR" styleClass="blank"/> 
                <apex:outputText value="{!Rental_Evidence__c.Rent_Review_Patterm__c}" id="RR" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
           
             <!--   <apex:outputLabel value="Yrs" style="position:absolute;right:60%"/>  -->
             <apex:pageBlockSectionItem >
                <apex:outputLabel value="Yrs" />
                <apex:outputField value="{!Rental_Evidence__c.Rent_Review_Pattern_Yrs__c}" id="RRyrs" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="RRcoms" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Rent_Review_Pattern_Comments__c}" id="RRcoms" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
            
            
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Fitted Out" for="FO" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Fitted_Out__c}" id="FO" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
            <apex:pageBlockSectionItem />
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="FOcoms" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Fitted_Out_Comments__c}" id="FOcoms" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
            
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Quantum" for="Qu" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Quantum__c}" id="Qu" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
            <apex:pageBlockSectionItem />
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="Qucoms" styleClass="blank"/>
                <apex:outputtext value="{!Rental_Evidence__c.Quantum_Comments__c}" id="s"/>
            </apex:pageBlockSectionItem> 


        </apex:pageBlockSection>

 

 

 

  • September 08, 2011
  • Like
  • 0

Hi

 

I'm trying to implement Jeff Douglas's dynamic search page on a custom object, its all set up and the page loads with the correct initial data, however when typing in the parameters the debug SOQL text doesn't update and the data in the table doesn't update, so i'm assuming the event isn't being triggered. How can i check if this is the case? and if so how can i resolve?

 

Thanks for any suggestions.

 

Paul

  • September 01, 2011
  • Like
  • 0

Hi

 

I have been using multiple pageblocks to achieve 2 - 1 - 2 - 1 column layout with all the headers apart from the first hidden ( to give the impression of all being one pageblocksection). This is because i have comment boxes that i want to span the width of the page whilst having other data points spanning 2 columns. However, this means when you collapse the section it only collapses the first section and not those where the header is hidden...

 

I'm pretty new to this and am guessing there's a much more elegant way of reproducing this effect!?

 

Thanks for any suggestions.

Paul

  • August 30, 2011
  • Like
  • 0

Hi

 

Is it possible to view the code for a page developed using the standard Salesforce tools?

 

I'm hoping to use this as the basis for a new visualforce page as it doesn't quite give me the UI i'm after.

 

Thanks for any suggestions.

Paul

  • August 26, 2011
  • Like
  • 0

Hi

 

I've got a visualforce page with a number of inputfields showing various dates, alongside them i have commandbuttons and another empty input field. I'd like the user to be able to type in a number of weeks into the empty box, click the button which will then automatically add the number of weeks to the date field. 

 

I'm pretty new to this, any ideas how i should go about it?

 

Thanks

Paul

  • May 26, 2011
  • Like
  • 0

Hi All

 

I've embedded a Google map in a visualforce page and am using an ajax query/javascript to display all the points from a custom object as markers on the map.

 

This was all working as expected until i did a bulk delete of a number of records from that custom object using the excel connector. After the delete, the deleted records are still being displayed on the map, however, if you query the object using the IDE the records have as expected been deleted.

 

Any ideas what is going on here!?

Thanks for any suggestions.

Paul

  • March 09, 2012
  • Like
  • 0

Hi

 

I'm using an extension to display data from the parent record (Site__c) on my VF page, this works correctly when i click on an existing record (Investment__c) in the related list, however, when i add a new Investment__c i get the following error:

 

System.QueryException: List has no rows for assignment to SObject

 

I'm guessing this is becausethe Id isn't available at this point ofr the new record. So does anyoneknow how i can get round this?

 

Code excerpt  below, Thanks for any suggestions!

Paul

 

	//get data from Parent Object
        Investment__c inv = (Investment__c)stdController.getRecord();
        
    	inv = [Select ID, Site__r.Address__c, Site__r.Postcode__c, Site__r.Town__c from Investment__c
    			where id=:stdController.getRecord().Id limit 1];
    			
    	SiteObj = inv.Site__r;
    //////

 

 

  • March 01, 2012
  • Like
  • 0

Hi All

 

I've got a visualforce page with a couple of pageblocksections (see code below), the first has 2 cols the 2nd has 3, currently the 3rd column on the second section is squashed up against the right hand side of the screen.

 

what i'd like is for the 3rd column of the second pageblocksection to start where the 2nd column of the first pageblocksection starts. I've tried essing around with the Style settings and after a lot of messing around got it to work using position:absolute but then realised it doesn't resize when the window resizes. getting fairly fustrated!

 

Hopefully the above makes sense and thanks to anyine whio can help me with this!

Cheers

Paul

 

        <apex:pageBlockSection showHeader="true" title="Parties" columns="2">
            <apex:outputField value="{!Rental_Evidence__c.Landlord__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Landlords_Agent__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Tenant__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Tenants_Agent__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.Arbitrator_Expert__c}" style="width: 100%;"/>
            <apex:outputField value="{!Rental_Evidence__c.X3rd_Party_Name__c}" style="width: 100%;"/>
        </apex:pageBlockSection>
        
        

        <apex:pageBlockSection showHeader="true" title="Allowances" columns="3" >


            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Assumed Term" for="assumed" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Assumed_Term__c}" id="assumed"  styleClass="blank"/>
            </apex:pageBlockSectionItem> 
            
            
          
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Yrs"/>
                <apex:outputField value="{!Rental_Evidence__c.Assumed_Term_Yrs__c}" id="assumedYrs" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
           
 
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="assumedcoms" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Assumed_Term_Comments__c}" id="assumedcoms" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Rent Review Pattern" for="RR" styleClass="blank"/> 
                <apex:outputText value="{!Rental_Evidence__c.Rent_Review_Patterm__c}" id="RR" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
           
             <!--   <apex:outputLabel value="Yrs" style="position:absolute;right:60%"/>  -->
             <apex:pageBlockSectionItem >
                <apex:outputLabel value="Yrs" />
                <apex:outputField value="{!Rental_Evidence__c.Rent_Review_Pattern_Yrs__c}" id="RRyrs" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="RRcoms" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Rent_Review_Pattern_Comments__c}" id="RRcoms" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
            
            
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Fitted Out" for="FO" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Fitted_Out__c}" id="FO" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
            <apex:pageBlockSectionItem />
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="FOcoms" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Fitted_Out_Comments__c}" id="FOcoms" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
            
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Quantum" for="Qu" styleClass="blank"/>
                <apex:outputText value="{!Rental_Evidence__c.Quantum__c}" id="Qu" styleClass="blank"/>
            </apex:pageBlockSectionItem> 
        
            <apex:pageBlockSectionItem />
        
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Comments" for="Qucoms" styleClass="blank"/>
                <apex:outputtext value="{!Rental_Evidence__c.Quantum_Comments__c}" id="s"/>
            </apex:pageBlockSectionItem> 


        </apex:pageBlockSection>

 

 

 

  • September 08, 2011
  • Like
  • 0

Hi

 

I'm trying to implement Jeff Douglas's dynamic search page on a custom object, its all set up and the page loads with the correct initial data, however when typing in the parameters the debug SOQL text doesn't update and the data in the table doesn't update, so i'm assuming the event isn't being triggered. How can i check if this is the case? and if so how can i resolve?

 

Thanks for any suggestions.

 

Paul

  • September 01, 2011
  • Like
  • 0