• JJE_OLD
  • NEWBIE
  • 40 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 22
    Replies
Hi,

I was wondering if it is a good practice to separate code deployment from point & click customization deployment?
If yes, how will you manage to deploy a Field API Name change?

Regards,
Hi,

I get the following error wityh salesforce for outlook
EndpointNotFoundException : The message with To 'net.pipe://localhost/SalesforceForOutlook/IAddInConfiguration' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree
The support told me that this is out of their scope and close the case
Can anyone help me understand what to do to resolve this?

thanks
Jean
Hi

I have a custom rtf field to format text that is published in a visual force page with an apex:outputtext component.
I want to add some color and bigger text but I don t see how with the rtf interface.
Is there a way to do this?

If not, is there a way to put html in a field and render it in a page?

Thanks

Hi,

 

I create a VF Page on a custom object on which were linked Content Documents.

On my Content Type I added a lookup to my custom object.

In get a list of COntentVersion in my controller and I am able to display a pageblocktable with the titles andlinks to the ContentDocument Page.

 

What I'm trying to do is to create a preview of the document which is clickable like when you post a document in Chatter.

Does someone know if and how this could be achieved?

 

thank you

Hi,

 

I see in Idea the the UserInfo.getUserEmail() function will be delivered in spring 13.

https://success.salesforce.com/ideaView?id=08730000000BpR9AAK

But I updated my eclipse plugin and still cannot see it, nor in the documentation.

Did I miss something? Is there something else to do to get the new functionnalities?

 

regards,

Hi,

 

I have an apex function which is sending emailsto the members of a Campaign which do not have related records on a specific object.

I need to be able to call this function on a time based trigger (e.g. one week after the campaign status was set to 'Finished')

 

Is there a way to do this?

 

Thanks,

Hi,

 

I'm trying to deploy some code but I get an Error that I am over the 100 SOQL limit in one of my test Classes.

I don't have a lot of code (8%) which is covered over 80% by the test classes.

I recently installed unmanaged packages and it seems then when trying to deploy everything is tested (it takes a very long time).

Does the limit apply in a cumulative way to all test classes at once ? Should I have less than 100 SOQL queries in all my code?

Or, is the class on which the error is triggered the one that I should review to have less SOQL in this one only?

Why were I able to deploy if my classe is above the limits?

 

How can I made my test class independant from other packages in terms of these limitations?

 

thanks,

Hi,

 

I'm trying to create a controller extension for Campaigns and get the following error:


Compile Error: Incompatible types since an instance of SObject is never an instance of Campaign at line 7 column 32 

 

My extension class is the following:

public class CampaignControllerExtension {
    private ApexPages.standardController controller {get;set;}
    private Campaign currentTraining;
    
    public CampaignControllerExtension(ApexPages.StandardController stdController) {
        controller = stdController;
        this.currentTraining = (Campaign)stdController.getRecord();
    }
}

 Apparently there is an exception on Campaigns Sobject but I didn't find any clue on how to correct this.

 Any Ideas?

 

thanks,

Hi,

 

I'm trying to write an apex test class

 

In eclipse Schema page I type the following SOQL request:

 

SELECT c.id FROM case c WHERE c.subject = 'Test Case' LIMIT 1

It works but when I'm trying to test this code:

@isTest
private class testCaseTrigger {
    static testMethod void testCase() {
        Test.startTest();
        Case cs = [SELECT c.id FROM case c WHERE c.subject = 'Test Case' LIMIT 1];
        
        cs.CR_Delivery_Version__c = '7.2';
        update cs;
        
        Case newCase = [SELECT crtargetrelease__c FROM case WHERE id =: cs.id];
        system.assertEquals('MEGA 2009', newCase.CRTargetRelease__c);    
        
        Test.stoptest();
    }
}

 I get the following error : 'List has no rows for assignement to SObject'

 

I also tried the following: 'Select id FROM case', and I get also an empty list.

What is the problem?

 

thanks,

 

 

I created an object to link Opportunities to Contacts with custom fields.

I set the relation to both Opportunity and Contact to Master-Detail type.

 

I'm trying now to create a Visualforce page to link several contacts at the same time with a pageBlocktable

 

<apex:pageBlockSection title="Contact Roles" showHeader="true" collapsible="false" columns="1" id="roleList">  
<apex:pageBlockTable value="{!crs}" var="cr">
    <apex:column headerValue="Contact">
        <apex:inputField value="{!cr.Contact__c}"/>
    </apex:column>
</apex:pageBlockTable>
<apex:commandButton value="Add Row" action="{!AddRow}" reRender="roleList"/>
</apex:pageBlockSection>

 The point is that when I'm clicking on the Add Row button (which is adding a new record to the crs list in the controller) or if I click on cancel, I am blocked because the contact is mandatory (Opportunity is filled by code).

 

Is there a way to bypass this validation on Cancel or Add Row or should I change my relation to Lookup?

If I use a lookup, I will lost the cascade delete on Contacts, to have this functionality with lookups I will have then to write OnDelete and OnUndelete Triggers. Is that the better solution in your opinion?

 

thanks,

Hi,

 

I want to merge records on Custom objects. Does anybody ever try to create a merge wizard with the look and feel of Salesforce standard merge function?

 

thanks,

 

 

Hi,

 

I'm looking for a way to access an object field dynamically (i.e. with the field name contained in a variable)

 

If I have:

 

String FieldName = 'AccountNumber';
Account ac = [SELECT id, Name, AccountNumber FROM Account LIMIT 1];

I'm trying to do something like this:

Result = ac[FieldName];

Where Result is the Value contained in the AccountNumber Field.

 

Is there a way to do this in apex?

 

thanks.

Hi,

 

I'm trying to create a Visualfore page for contact but don't know how to display the new Social Contact part in it?

Is that possible with VF?

 

Thanks,

Hi,

 

I have several page layout for Contact and wanted to override some of them with a Visualforce page.

Is there a way to do this by profile (like we can select the profile page layout) or should we manage all the displayed differences in our code?

 

Thanks,

Hi,

 

I created a Trigger on Opportunity, which updates a custom date field.

 

trigger SetOpportunityEndDate on Opportunity (before insert, before update) {

for (Opportunity op: Trigger.new) {

...

        op.MaintenanceEndDate__c = op.Maintenance_Start_Date__c.addMonths(op.Maintenance_Duration__c.intValue());

...

        system.debug('*****************************' + op.MaintenanceEndDate__c);    
    }

}

 

My Test class is like the following:

 

@isTest
private with sharing class testEndDate {
    public static testMethod void testOpportunityEndDate() {
        Opportunity op = new Opportunity();
        //Fields Initialization

        op.Maintenance_Duration__c = 2;


        Insert op;

        system.debug('******************************************************End Date: ' + op.MaintenanceEndDate__c);
        system.assertEquals(op.Maintenance_Start_Date__c.addMonth(2), op.MaintenanceEndDate__c);      
    }
}

 

When I run my tests, the trigger System.debug gives me the correct end date.

But after insert op in the test class the End date is null in the system.debug and the following assertEquals fails.

 

When I made a change on an Opportunity in my sandbox, the end date is correctly calculated. Does it have something to do with the Insert?

 

What am I doing wrong?

 

thanks,

Hi,

I created a custom object, with a status field and workflow rules with are based on this status.
On each status change, the workflow send an email to the object creator
On some status change, the workflow also change the Owner and the record type.

I created a trigger on this object to inform related contacts that the status evolved, but, when the status is updated to a value for which there is a record type and an owner change, the trigger is fired twice and therefore, I get two emails for each contacts.
It works well for others status.

Is there a problem when firing trigger and workflow on the same event?
What should be done to correct this?

regards,

Hi,

I get the following error when trying to use a VF template since the winter 11:

(SELECT id, solution.solutionnote, solution.__procedure_information__c
^
ERROR at Row:1:Column:55
No such column '__procedure_information__c' on entity 'Solution'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

The same when previewing the template :
Error occurred trying to load the template for preview:
solution.solutionnote, solution.solutionnumber, solution.__solution_quality__c,
^
ERROR at Row:1:Column:80
No such column '__solution_quality__c' on entity 'Solution'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.. Please try editing your markup to correct the problem.

And when trying to save:
Error: ; nested exception is: common.exception.ApiQueryException: solution.solutionnote, solution.solutionnumber, solution.__solution_quality__c, ^ ERROR at Row:1:Column:80 No such column '__solution_quality__c' on entity 'Solution'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

My field name is solution_quality__c without __ at the beginning
and my vf code is:
<apex:repeat var="Sols" value="{!RelatedTo.CaseSolutions}">
<table cols="2" border="0" width="100%" cellspacing="2">
<tr><td width="20%" valign="top" bgcolor="#EEEEEE">Solution Quality:</td><td width="80%"><apex:outputText value="{!Sols.Solution.Solution_Quality__c}"/></td></tr>
<tr><td width="20%" valign="top" bgcolor="#EEEEEE">Additional Information:</td><td width="80%"><!--apex:outputText value="{!Sols.Solution.Procedure_information__c}" escape="false"/--></td></tr>
</table>
</apex:repeat>

what's wrong with this?

Hi,

 

I just installed Salesforce for outlook to try it.

I'm able to send and add an email to a contact but on received or sent email that I tried, I always have the

"The email did not contain any useable content." message.

 

Is there something I do wrong?

 

Thanks,

 

 

I have a conditional formula with two variables.  The first part is checking to see if the Product Category is = 'Equipment", if it is true, it checks to see if the UnitPrice is greater than the ListPrice, if so it does a calcualtion, if ELSE it does a case statement.  Before the case statement, I need to check to make sure the Product Category is "Equipment".  Can someone please show me how to check for that before th case statement.

It is calculating for all my other commission rates even if it is not Equipment right now.

Below is my syntax, thank you!!!

IF(

((Product_Category__c = "Equipment") && (UnitPrice > ListPrice)) ,

(0.075 * Discounted_Sales_Price__c) * Quantity ,

(
CASE(ROUND(((ListPrice - UnitPrice)/ListPrice),2),
0.00, 0.075,
0.005, 0.07232,
0.01, 0.06964,
0.0150, 0.06696,
0.020, 0.06429,
0.0250, 0.06161,
0.030, 0.05893,
0.0350, 0.05625,
0.040, 0.05357,
0.0450, 0.05089,
0.050, 0.04821,
0.0550, 0.04554,
0.060, 0.04286,
0.0650, 0.04018,
0.070, 0.03750,
0.0750, 0.03482,
0.080, 0.03214,
0.0850, 0.02946,
0.090, 0.02679,
0.0950, 0.02411,
0.10, 0.02143,
0.105, 0.01875,
0.11, 0.01607,
0.115, 0.01339,
0.12, 0.01071,
0.125, 0.00804,
0.13, 0.00536,
0.135, 0.00268,
0.14, 0.0000,
NULL)* Discounted_Sales_Price__c) * Quantity)
Hi All - I'm hoping someone can help.  I've deployed the class at the following link:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_TerritoryMgmt_OpportunityTerritory2AssignmentFilter.htm

I'm using this to assign opportunities.  All of our accounts have exactly one opportunity.  When I run the opportunity filter, it is assigning 165 out of 629 opportunities.  If I run it again, it assigns 464 opportunities and leaves 165 unassigned.  Has anyone experienced this?  Salesforce support told me my only option is to look for help here as we are not a premier customer.  

Thanks for any help you can provide.
 

Hi,

 

I see in Idea the the UserInfo.getUserEmail() function will be delivered in spring 13.

https://success.salesforce.com/ideaView?id=08730000000BpR9AAK

But I updated my eclipse plugin and still cannot see it, nor in the documentation.

Did I miss something? Is there something else to do to get the new functionnalities?

 

regards,

Hi,

 

I'm trying to deploy some code but I get an Error that I am over the 100 SOQL limit in one of my test Classes.

I don't have a lot of code (8%) which is covered over 80% by the test classes.

I recently installed unmanaged packages and it seems then when trying to deploy everything is tested (it takes a very long time).

Does the limit apply in a cumulative way to all test classes at once ? Should I have less than 100 SOQL queries in all my code?

Or, is the class on which the error is triggered the one that I should review to have less SOQL in this one only?

Why were I able to deploy if my classe is above the limits?

 

How can I made my test class independant from other packages in terms of these limitations?

 

thanks,

Hi,

 

I'm trying to create a controller extension for Campaigns and get the following error:


Compile Error: Incompatible types since an instance of SObject is never an instance of Campaign at line 7 column 32 

 

My extension class is the following:

public class CampaignControllerExtension {
    private ApexPages.standardController controller {get;set;}
    private Campaign currentTraining;
    
    public CampaignControllerExtension(ApexPages.StandardController stdController) {
        controller = stdController;
        this.currentTraining = (Campaign)stdController.getRecord();
    }
}

 Apparently there is an exception on Campaigns Sobject but I didn't find any clue on how to correct this.

 Any Ideas?

 

thanks,

Hi,

 

I'm trying to write an apex test class

 

In eclipse Schema page I type the following SOQL request:

 

SELECT c.id FROM case c WHERE c.subject = 'Test Case' LIMIT 1

It works but when I'm trying to test this code:

@isTest
private class testCaseTrigger {
    static testMethod void testCase() {
        Test.startTest();
        Case cs = [SELECT c.id FROM case c WHERE c.subject = 'Test Case' LIMIT 1];
        
        cs.CR_Delivery_Version__c = '7.2';
        update cs;
        
        Case newCase = [SELECT crtargetrelease__c FROM case WHERE id =: cs.id];
        system.assertEquals('MEGA 2009', newCase.CRTargetRelease__c);    
        
        Test.stoptest();
    }
}

 I get the following error : 'List has no rows for assignement to SObject'

 

I also tried the following: 'Select id FROM case', and I get also an empty list.

What is the problem?

 

thanks,

 

 

I created an object to link Opportunities to Contacts with custom fields.

I set the relation to both Opportunity and Contact to Master-Detail type.

 

I'm trying now to create a Visualforce page to link several contacts at the same time with a pageBlocktable

 

<apex:pageBlockSection title="Contact Roles" showHeader="true" collapsible="false" columns="1" id="roleList">  
<apex:pageBlockTable value="{!crs}" var="cr">
    <apex:column headerValue="Contact">
        <apex:inputField value="{!cr.Contact__c}"/>
    </apex:column>
</apex:pageBlockTable>
<apex:commandButton value="Add Row" action="{!AddRow}" reRender="roleList"/>
</apex:pageBlockSection>

 The point is that when I'm clicking on the Add Row button (which is adding a new record to the crs list in the controller) or if I click on cancel, I am blocked because the contact is mandatory (Opportunity is filled by code).

 

Is there a way to bypass this validation on Cancel or Add Row or should I change my relation to Lookup?

If I use a lookup, I will lost the cascade delete on Contacts, to have this functionality with lookups I will have then to write OnDelete and OnUndelete Triggers. Is that the better solution in your opinion?

 

thanks,

Hi,

 

I have several page layout for Contact and wanted to override some of them with a Visualforce page.

Is there a way to do this by profile (like we can select the profile page layout) or should we manage all the displayed differences in our code?

 

Thanks,

Hi All,

 

I have created a utility to merge records of any standard object (except user) and custom objects. User can select upto three records of any object to merge. User can select a Master record and also select the fields of child records. All the related objects can also be merged using that utility.

 

Thanks,
Devendra Natani (Salesforce Certified Developer)

Blog

 

 

Hi,

I created a custom object, with a status field and workflow rules with are based on this status.
On each status change, the workflow send an email to the object creator
On some status change, the workflow also change the Owner and the record type.

I created a trigger on this object to inform related contacts that the status evolved, but, when the status is updated to a value for which there is a record type and an owner change, the trigger is fired twice and therefore, I get two emails for each contacts.
It works well for others status.

Is there a problem when firing trigger and workflow on the same event?
What should be done to correct this?

regards,

I have the following SOQL used in a VisualForce page:

 

"Select c.Product__r.PA_Product_Class__c productClass, sum(c.Rolling_12_Current__c) sales from PA_Customer_History__c c where c.Account__c = '{!account.Id}' group by c.Product__r.PA_Product_Class__c"

 

The field Rolling_12_Current__c is a currency field and the records I am querying are all in USD. Our corporate currency is EUR. My user is set up with a currency of USD. When the query is run, the sum() returns back a converted value in EUR instead of USD. According to the documentation at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm, this shouldn't happen: "Currency data is converted to the user's locale and then processed by the aggregate function."

 

My user's currency is in USD, so it should display it properly in USD. As a temporary work around, I've changed our exchange rate to 1. Can someone please let me know how I can get the SOQL aggregate to return the values in my user's currency? I tried using convertCurrency, but I get a malformed query error.

Does anyone know how I can write a formula to pull updated currency conversion data for the calculation and where I might get this data from?
  • September 06, 2006
  • Like
  • 0