• giorgio70
  • NEWBIE
  • 25 Points
  • Member since 2009

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

is there a possibility to write a test class for this  -

 

trigger  duplicatecandidate on Candidate__c (after insert) {


}

 

why i ask? 

 

I have a triiger in Production (long story how it got there),

 

when i am trying to deploy some components, deployment fails giving me an erro that duplicatcandidate trigger needs atleast 1% coverage.

 

 

  • September 25, 2012
  • Like
  • 0

Hello,

 

I found this article describing how View State works. I would like to reproduce the behavior showed in Figure 1

 

http://wiki.developerforce.com/page/An_Introduction_to_Visualforce_View_State

 

Basically I have a form, with a button.

Once the user clicks on the button, I want to be able to display a message (error or success) on the same page, using a postback

 

Can anyone share the code I need to add to my page/controlle, to accomplish what is described in Figure 1 in the link above?

 

Thanks a lot

Giorgio

Hello

 

I developed a Visualforce Page with a Custom List Controller.

 

I display several Contacts in a matrix on my Page.

I display these fields:

 

- Contact First Name

- Contact Last Name

- Contact Phone

- Account Name

- Account Phone

 

I want to be able to make changes to all of these fields, and SAVE.

In this case I change Contact Fist Name AND Account Phone, I want to be able to SAVE and UPDATE both the Contacts and the Accounts records.

 

Is there a way to do this in a custom controller?

I am nos sure how my getters and setters would be defined in order to get the new values for the Account fields

 

Thanks

Giorgio

 

Hello

 

I develped an HTTP Callout to an internal system.

We basically issue a call to create a new record in a database, and in return we get the ID of the newly created record .

 

I created a Visualforce page for a custom object, called WS.

The page has a controller extension.

This page has a custom button, which calls an action defined in the controller extension. The action issues the callout to the WS.

 

When I get my response back, I would like to update a the WS record with the data I receive back from the callout.

 

What is the best way to do this?

 

Thanks a lot in advance

Giorgio

 

 

Hello

 

we created 4 new custom object in a DEV environment.

We also created 2 profiles, with different permissions on these 4 custom objects.

For example, profile A would have read/write access to all objects and the TAB would be set to "ON".

 

We then deployed from the DEV org to another org, called UAT, where we run our User Acceptance Tests.

 

We followed these steps:

 

PASS 1 - deploy the 4 custom objects

PASS 2 - deploy the 2 profiles and workflow rules

 

Once I deployed to UAT, and logon to UAT, I see that the 2 new profiles were created, but they had no visibility into any of the 4 custom objects (the TAB was set to HIDDEN and the objects had no permissions set.

 

Had anyone had a similar issue before? What am I missing? Whay are the permission sets not properly copied from DEV to UAT?

 

Thanks a lot in advance for your ideas

 

Giorgio

Hello

 

The standard Quota/Forecast salesforce.com object is very limited when it comes to reports.

 

I would like to create a custom object called QUOTA, with these fields:

 

Lookup to USER

Quota (Currency)

Product Family

Start Date

End Date

 

This would basically replicate the ReveueForecast object.

 

I would also create a custom field on the Opportunity Line Items object, to lookup the Quota.

I would then write an APEX trigger to link the line item to the proper quota line based on User, Close Date and Product Family.

In this way I am trying to link each item to the Quota they contribute to.

 

I am not sure this approach could work. After a mock up, I realize that I would have a hard time getting a rollup of the Quota by User by Product value.

 

Has anyone tried an approach to creating their own Quota object to bypass some of the salesforce limitations? Can you share what data model you have come up with?

 

My goal is to get a report that shows the performance by sales person against their quota WITH THE ABILITY to drill down the Opportunity level (this is not possible using standard forecast Salesforce.com reports)

 

Thanks

Giorgio

 

 

 

 

 

Hello

 

On my Opportunity Page I would like to create 4 custom buttons called Q1, Q2, Q3 and Q4.

 

When a user clicks Q1, the button should pre-populate the Opportunity Close date with the last day in Q1. I have the logic to perform this, but I am unable to find out if I can actually set the Close Date value on the browser to that it gets visible right away

 

I appreciate any suggestions

Thanks
Giorgio

Hello

 

I created a component/class that returs the email address of the Primary Contact Role for an opportunity.

 

Now I would like to use this value to prepopulate the "TO" address when I chose to use this template.

 

Below is the page I have created.

 

How can use the mail.setToAddresses method?


Thanks

Giorgio

 

 

<messaging:emailTemplate subject="Thanks for your business" recipientType="Contact" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
subject="Test Giorgio Contact Roles"

Congratulations!
This is your new Visualforce Email Template.
Thanks for your donation of

 

mail.setToAddresses(<c:MyEmailComponent componentValue="{!relatedTo.id}" />)

 

</messaging:plainTextEmailBody>

</messaging:emailTemplate>

Thanks

Hello

 

This is what I am trying to do. From a page conatining an Account ID in the  URL (https://c.na6.visual.force.com/apex/Test20100123?id=0018000000dsRyo)

 

I want to pass the ID to a component, who then will pass it to a class that queries contacts linked to that ID.

 

I created these elements:

 

A page:

 

<apex:page >
  <c:MyComponent componentValue= ':ApexPages.currentPage().getParameters().get('id')' />  
</apex:page>

 

My page uses a Component, called MyComponent

 

<apex:component controller="myComponentController">
  <apex:attribute name="componentValue" description="Attribute on the component."
                  type="Id" required="required" assignTo="{!controllerValue}"/>
    <apex:pageBlock title="My Custom Component">
      <p>
        <code>componentValue</code> is "{!componentValue}"
        <br/>
        <code>controllerValue</code> is "{!controllerValueContact.name}"
      </p>
    </apex:pageBlock>
</apex:component>

 

This component uses a custom controller called myComponentController

 

public class myComponentController {
   
  public Id controllerValue { get; set; }    
  public Contact controllerValueContact;
  public List<Contact> ListContact;

   
  public myComponentController() {
 
  }
  
  public Contact getControllerValueContact() {
    ListContact = [select id, name from Contact where AccountId = :controllerValue];
    controllerValueContact = ListContact.get(0);
    return controllerValueContact;
  }
}

 

 

When I run my page I get this error:

 

Error: Attribute name "id" associated with an element type "apex:componentReference" must be followed by the ' = ' character. at line 2

 

Anyone has an idea what am I doing wrong?

 

Thanks

Giorgio

Hello

 

I have two custom objects with a one to many relationship: Programs can receive multiple Reviews. 

 

I have developed a simple page that allows me to edit and save several review records at the same time, using standard list controller. See the code below. This will list ALL the reviews in my organization, allow me to make changes and save all the review records I modify

 

Now I would like to use the same functionality to be able to edit all the reviews that are related to a particular program. From within the Program record related list, I created a button that executes this Visualforce page, but this brings up ALL the reviews records, and not only those in the related list. How can I tell my Visualforce page to only display the records in the related list?

 

Thanks in advance for your help

Giorgio

 

 

 

<apex:page standardController="Review__c" recordSetVar="review__c">
<apex:form >

  <apex:pageBlock >
  <apex:pageBlockButtons >
      <apex:commandButton value="Save" action="{!save}"/>
   </apex:pageBlockButtons>
    <apex:pageBlockTable value="{!Review__c}" var="a">
      <apex:column value="{!a.name}"/>
      <apex:column headerValue="Review Approved?">
         <apex:inputField value="{!a.Review_Approved__c}"/>
      </apex:column>

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

</apex:form>
</apex:page> 

 

Hello

 

I am trying to build a table of data in a page.

 

I have used the tutorial I find in the Visualforce guide, and it works just fine.

 

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

<apex:page standardController="Account">
   <apex:pageBlock title="Hello {!$User.FirstName}!">
      You are viewing the {!account.name} account.
   </apex:pageBlock>
   <apex:pageBlock title="Contacts">
      <apex:pageBlockTable value="{!account.Contacts}" var="contact">
         <apex:column value="{!contact.Name}"/>
         <apex:column value="{!contact.MailingCity}"/>
         <apex:column value="{!contact.Phone}"/>
      </apex:pageBlockTable>
   </apex:pageBlock>
</apex:page>

 Now, I am trying to adjust this to match what I am trying to do.

 

I have two custom objects:

 

Program Participation (which contains a master lookup fiels to Contacts, who participated in this program)

Review (this object has a lookup field to program participation, and basically allows to enter different reviews on the program)

 

What I am trying to do is, from within the Program Participation, to display all the reviews . This is the code I have

 

<apex:page standardController="Program_Participation__c">

    <apex:pageBlock title="Hello {!$User.FirstName}!">

    You are viewing the {!Program_Participation__c.name} Program Participation record

 

          <apex:pageBlockTable value="{!Program_Participation__c.Reviews}" var="review">         <apex:column value="{!review.Name}"/>

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

   </apex:page>

 

 When I save I get this error message

 

  

Error: Invalid field Reviews for SObject Program_Participation__c

 

Does anybody have an idea why this is happening?

 

Thanks

Giorgio

All,

 

Each time I find instructions to enable Person Accounts in my Developer Edition Org, they include "Click Your Name > Setup > Customize > Accounts > Person Accounts".  In two instances, this guidance was preceded by a couple of additional items, which I have completed.

 

My Developer Edition Org does not have an option for Person Accounts in the Setup hierarchy described.  I have "Your Name > Setup > Customize > Accounts > (a number of options that do not include Person Accounts)".

 

Did they move this function with Winter'13, and simply forgot to update the Help documentation?

 

Anyone know how to enable Person Accounts in my Developer Edition Org?

 

Many thanks!

is there a possibility to write a test class for this  -

 

trigger  duplicatecandidate on Candidate__c (after insert) {


}

 

why i ask? 

 

I have a triiger in Production (long story how it got there),

 

when i am trying to deploy some components, deployment fails giving me an erro that duplicatcandidate trigger needs atleast 1% coverage.

 

 

  • September 25, 2012
  • Like
  • 0

 

I am unable to display dark inner column(vertical) single line borders.

 

I have used:

<apex:pageBlock>

<apex:pageBlockSection>

<apex:pageBlockTable>

 

Also, is there any way to repeat column headers in a table for every page when we take print-out?
I have used a .css file with code in it as:

@media print{

thead{display:table-header-group;}

}

and used it using the style tag as

<apex:styleSheet value="{!$Resource.fileName}"/>

 

 

Can anyone help?

Hello

 

I developed a Visualforce Page with a Custom List Controller.

 

I display several Contacts in a matrix on my Page.

I display these fields:

 

- Contact First Name

- Contact Last Name

- Contact Phone

- Account Name

- Account Phone

 

I want to be able to make changes to all of these fields, and SAVE.

In this case I change Contact Fist Name AND Account Phone, I want to be able to SAVE and UPDATE both the Contacts and the Accounts records.

 

Is there a way to do this in a custom controller?

I am nos sure how my getters and setters would be defined in order to get the new values for the Account fields

 

Thanks

Giorgio

 

Has anyone else noticed this or know how to fix it?  All the sudden (in the past month or two maybe?) I noticed that when running my Test classes, the Debug Log is cut far short of the full log.  For instance:

11:16:57.316 (1316050000)|WF_RULE_FILTER|[Account : Category excludes Client] AND
 [Account : Category excludes MHK Fin. Client] AND
 [Account : Mortgage Rep not equal to null] AND
 [Account : Category includes MHK Real Estate] AND
 [Account : Category excludes Private Client Services] AND
 [Account : Account Recor

 Thats the last section of my debug log - it cuts off in the middle of not only the code, but the sentence and even the word!  I don't think I've changed anything...

 

Obviously this is kind of an issue since my code is breaking well AFTER this point - and I have no way to debug it!  Help!

  • July 06, 2011
  • Like
  • 0

Hello

 

On my Opportunity Page I would like to create 4 custom buttons called Q1, Q2, Q3 and Q4.

 

When a user clicks Q1, the button should pre-populate the Opportunity Close date with the last day in Q1. I have the logic to perform this, but I am unable to find out if I can actually set the Close Date value on the browser to that it gets visible right away

 

I appreciate any suggestions

Thanks
Giorgio

Hello

 

I have two custom objects with a one to many relationship: Programs can receive multiple Reviews. 

 

I have developed a simple page that allows me to edit and save several review records at the same time, using standard list controller. See the code below. This will list ALL the reviews in my organization, allow me to make changes and save all the review records I modify

 

Now I would like to use the same functionality to be able to edit all the reviews that are related to a particular program. From within the Program record related list, I created a button that executes this Visualforce page, but this brings up ALL the reviews records, and not only those in the related list. How can I tell my Visualforce page to only display the records in the related list?

 

Thanks in advance for your help

Giorgio

 

 

 

<apex:page standardController="Review__c" recordSetVar="review__c">
<apex:form >

  <apex:pageBlock >
  <apex:pageBlockButtons >
      <apex:commandButton value="Save" action="{!save}"/>
   </apex:pageBlockButtons>
    <apex:pageBlockTable value="{!Review__c}" var="a">
      <apex:column value="{!a.name}"/>
      <apex:column headerValue="Review Approved?">
         <apex:inputField value="{!a.Review_Approved__c}"/>
      </apex:column>

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

</apex:form>
</apex:page> 

 

Hello

 

I am trying to build a table of data in a page.

 

I have used the tutorial I find in the Visualforce guide, and it works just fine.

 

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

<apex:page standardController="Account">
   <apex:pageBlock title="Hello {!$User.FirstName}!">
      You are viewing the {!account.name} account.
   </apex:pageBlock>
   <apex:pageBlock title="Contacts">
      <apex:pageBlockTable value="{!account.Contacts}" var="contact">
         <apex:column value="{!contact.Name}"/>
         <apex:column value="{!contact.MailingCity}"/>
         <apex:column value="{!contact.Phone}"/>
      </apex:pageBlockTable>
   </apex:pageBlock>
</apex:page>

 Now, I am trying to adjust this to match what I am trying to do.

 

I have two custom objects:

 

Program Participation (which contains a master lookup fiels to Contacts, who participated in this program)

Review (this object has a lookup field to program participation, and basically allows to enter different reviews on the program)

 

What I am trying to do is, from within the Program Participation, to display all the reviews . This is the code I have

 

<apex:page standardController="Program_Participation__c">

    <apex:pageBlock title="Hello {!$User.FirstName}!">

    You are viewing the {!Program_Participation__c.name} Program Participation record

 

          <apex:pageBlockTable value="{!Program_Participation__c.Reviews}" var="review">         <apex:column value="{!review.Name}"/>

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

   </apex:page>

 

 When I save I get this error message

 

  

Error: Invalid field Reviews for SObject Program_Participation__c

 

Does anybody have an idea why this is happening?

 

Thanks

Giorgio