• paul.mag
  • NEWBIE
  • 30 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 19
    Replies

can anybody explain what is by Hard coding..?

 

Thank you

We are going to keep certain types of leads from existing clients and as a result we want to be able to create an activity and log it against the contact record and relate it to the lead object. WhoId = contact.id & WhatId = Lead.Id. Even if we could simply fire text into the WhatId rather than creating the standard link would be ok.

Thanks in advance

Paul
We are extending the lead object to capture expressions of interest from our website. This means that some new records will be existing contacts and we want to inform either the account manager or client services rep of the expression of interest. I'm messing around with a trigger to do this but as i'm just getting into apex any help would be appreciated.
The flow is:
Lead created
Lead is a contact
Go to the account team and search for Account manager & client services
Update field on lead record with the user name for those roles

Thanks

Hi there we are going to pull our users details name, email etc from a portal site onto their contact record in SFDC to allow us to compare the values. We will also include an auto update trigger checkbox that allows the contact owner to accept the portal site as the source of truth and overwrite the contact fields. The code below does this but a new requirement has arisen that means the trigger should only fire if any of the Portal fields have changed.

 

In a formula id just use ischanged(c.strPortalTitle__c) but I doubt that'll work in apex triggers :-)

 

 

"trigger AutoUpdate on Contact (after delete, after insert, after undelete, 
after update, before delete, before insert, before update) {

    if (trigger.isBefore){
       if (trigger.isInsert || trigger.isUpdate){
        for (Contact c : trigger.new){
        
            if (c.intAutomaticallyUpdate__c){

      
    if (c.Salutation != c.strPortalTitle__c) c.Salutation = c.strPortalTitle__c; 
                
            //Multiselect picklist fields
        if (c.strMarketingOptOutPreference__c != c.strPortalMarketingOptOutPreference__c) c.strMarketingOptOutPreference__c = c.strPortalMarketingOptOutPreference__c;
        if (c.strCompanyPeerGroupFocus__c != c.strPortalCompanyPeerGroupFocus__c) c.strCompanyPeerGroupFocus__c = c.strPortalCompanyPeerGroupFocus__c;
        if (c.Commodity_Fuel_Focus__c != c.strPortalCommodityFuelFocus__c) c.Commodity_Fuel_Focus__c = c.strPortalCommodityFuelFocus__c;
        if (c.Regional_Focus__c != c.strPortalRegionalFocus__c) c.Regional_Focus__c = c.strPortalRegionalFocus__c;"

 

Thanks in advance for your help

 

Paul

 

I need to update my outlook configurations for users based uponm their geographic location (as per their user record) but can't see a way to get to this via API. If I can't i'll have to do this user by user :-(.

 

Any thoughts?

 

Thanks in advance

 

Paul

Can anyone help me write a trigger that will update my Role_Level__c picklist with the value of strPortalRoleLevel__c picklist field if they do not match and if my checkbox intAutomaticallyUpdate__c is TRUE.

So

IF

intAutomaticallyUpdate__c = TRUE &&

Role_Level__c <> strPortalRoleLevel__c

 

Then

Update Role_Level__c with strPortalRoleLevel__c

 

Hopefully someone can help write this into an actual trigger, I also have some MSPL fields that will require the same / similar solution.

 

Thanks in advance

 

Paul

I want to add a competitor picklist to my opportunity record and if a certain competitor is slected I want to add people who know about that competitor. I imagine i'd update their user page with a custom field that specifies which competitor they are subject matter experts on. It'd also be good if the opportunity owner was directed to a chatter group about the competitor.

 

Thanks in advance

 

Paul

Hi there, we want to alert chatter users when someone is out of the office. As a first step we have an out of office graphic that users will manually set. Is it possible to have a link that they could click that will autiomatically switch the image? I guess as an end to end piece of work it should also display the original image when clicked again. Any thoughts?

 

Cheers

 

Paul

Hi there, we have a custom object "Invoice Request" that has a lookup relationship with Opportunity. I want the standard currency picklist  field on the Inoice Request record set to whatever value is in the standard currency picklist field on the Opportunity record. This should only happen on creation of the Invoice Request record, users should be able to invoice in whatever currency they choose.

 

Thanks in advance

 

Paul

 

Hi there, trying to get a handle on apex and VF and would appreciate your help.

 

We deliver training sessions to our clients on how to use our products. Training sessions are broken down into session content and the session content is related to products. Currently my users have to create a new session content record for each product they are discussing which they find time consuming and annoying. I'd like to replace the product lookup with a custom button / link that opens a VF page and allows the user to filter the list by product name / group then check box multiple products and add them to the session content record.

 

Any thoughts on this?

 

Thanks

 

Paul

We would like to be able to create a case for Salesforce support from an internal case. I have created a custom button that will open up the help portal to the new case page but id also like to grab the subject line & description box. Just wondered if anyone else had done this or knew how I could do it.

 

Cheers

I'll try to explain this as best I can but if anything isn't clear please let me know.

 

I am trying to add a field to filter a list of opportunity product line (OPL) items by their start date, we can have OPL for 2012 and the same OPL s for 2013, 2014 etc. Some clients might buy 50+ each year and we need to be abale to apply certain values to just the 2014 OPL. We had a developer build the page and some string filter fields, I have boldly copied the existing work and have the field displaying on the VF page but when I apply the filter I get the error message "like operator only valid on string field". I assume this means that a date field cannot be "Like" anything but actually be that value.

This appears to be the bit of apex that i need to tinker with, could anyone suggest how I shoehorn in a date filter?

 

Thanks in advance

 

/**  
/**
     * Build a list of the required fields, to form the select part of the dynamic SOQL.
     */
    private String buildSelect() {
        
        String selectClause = 'select Id';
        for (String fieldName : tableFields) {
            selectClause += ', ' + fieldName;
        }
        
        return selectClause;
        
    }
    
    
    
    /**
     * Build a series of "and field = 'value'" clauses to append to the SOQL for the dynamic filters.
     */
    private String addFiltering(Map<String, String> filterFields) {
        // If we don't have any filter fields, return immediately.
        if (filterFields == null) {
            return '';
        }
        
        String andClauses = '';
        
        for (String fieldName : filterFields.keyset()) {
            // Escape single quotes on the filter value to avoid SOQL injection.
            String filterValue = String.escapeSingleQuotes(filterFields.get(fieldName));
            andClauses += ' and ' + fieldName + ' like \'%' + filterValue + '%\'';
        }
        
        return andClauses;
    }

*/

 

 

Hi there trying to extract my orgs fields with all the properties i,e. data type and if a picklist the values. I have found an app called cloud converter that does pretty much all i need apart from the description field, which we use heavily. Can anyone help me create an extract to get this info.

 

Thnaks in advance

 

Paul

We have a need to compile a dictionary of all our fields labels, names, definitions, help text, type and properties i.e. picklist values. I believe I can export the metadata from Salesforce but not sure how to do this and what to do with it once it is out. Can anyone help with thsi please?

 

Thanks

Hey there first post and thanks in advance for your help.

 

Can anyone let me know what their best practise is when shifting users about.

What do you do when a user goes on maternity leave, is there a way to freeze the user without having to pay X dollars per month for the privilege.

We have many users on a full license but it appears that they actually only need a chatter free license but I can't see an easy way of switching them over.

 

Thanks again for your help

 

Paul

I need to update my outlook configurations for users based uponm their geographic location (as per their user record) but can't see a way to get to this via API. If I can't i'll have to do this user by user :-(.

 

Any thoughts?

 

Thanks in advance

 

Paul

We are extending the lead object to capture expressions of interest from our website. This means that some new records will be existing contacts and we want to inform either the account manager or client services rep of the expression of interest. I'm messing around with a trigger to do this but as i'm just getting into apex any help would be appreciated.
The flow is:
Lead created
Lead is a contact
Go to the account team and search for Account manager & client services
Update field on lead record with the user name for those roles

Thanks
Hello everyone,
I'm trying to show two different page layouts for cases depending on a certain field (contact origin). Is this possible?
Thanks!
Hello Experts,

Can somebody help me to know how do i find out which reports are being used how many times ? Is there any standard fucntionality available to know this kind of information ?

Hi there, we want to alert chatter users when someone is out of the office. As a first step we have an out of office graphic that users will manually set. Is it possible to have a link that they could click that will autiomatically switch the image? I guess as an end to end piece of work it should also display the original image when clicked again. Any thoughts?

 

Cheers

 

Paul

Hi there, we have a custom object "Invoice Request" that has a lookup relationship with Opportunity. I want the standard currency picklist  field on the Inoice Request record set to whatever value is in the standard currency picklist field on the Opportunity record. This should only happen on creation of the Invoice Request record, users should be able to invoice in whatever currency they choose.

 

Thanks in advance

 

Paul

 

Hi,

 

I want a date field on Contact to be updated with a date on which the first Opportunity was created for that contact. I only want the filed to be updated once when the first opportunity is created not for any other Opportunities.

 

 

Thanks in advance 

I need to create a custom button that will open up a new case layout. The default layout is the case screen but I want users to see another layout when they click on a button called Send Case within the default case layout. I've already created the case page layout that I want users to see when they click this button but I can't figure out how to specify the appropriate URL for this layout within the associated custom button I created i.e. Send Case.

 

Can someone point me in the right direction on how to accomplish this?

 

Thank you.

can anybody explain what is by Hard coding..?

 

Thank you

i want to add a picklist value by default to all my campaign members. i am getting 'Sent and 'Responded' as values currently. Would be glad to add few more values to that.

  • March 29, 2013
  • Like
  • 0

Hi friends,


I have query regarding relationship between objects. I have One standard object(A), two custom objects(B,C). I want C as related list in both A and B. What kind of relationship should be there between A,B and C(I think look up does it). But I want A and B as related lists in C also. To serve this purpose what kind of relation should be there?

I'll try to explain this as best I can but if anything isn't clear please let me know.

 

I am trying to add a field to filter a list of opportunity product line (OPL) items by their start date, we can have OPL for 2012 and the same OPL s for 2013, 2014 etc. Some clients might buy 50+ each year and we need to be abale to apply certain values to just the 2014 OPL. We had a developer build the page and some string filter fields, I have boldly copied the existing work and have the field displaying on the VF page but when I apply the filter I get the error message "like operator only valid on string field". I assume this means that a date field cannot be "Like" anything but actually be that value.

This appears to be the bit of apex that i need to tinker with, could anyone suggest how I shoehorn in a date filter?

 

Thanks in advance

 

/**  
/**
     * Build a list of the required fields, to form the select part of the dynamic SOQL.
     */
    private String buildSelect() {
        
        String selectClause = 'select Id';
        for (String fieldName : tableFields) {
            selectClause += ', ' + fieldName;
        }
        
        return selectClause;
        
    }
    
    
    
    /**
     * Build a series of "and field = 'value'" clauses to append to the SOQL for the dynamic filters.
     */
    private String addFiltering(Map<String, String> filterFields) {
        // If we don't have any filter fields, return immediately.
        if (filterFields == null) {
            return '';
        }
        
        String andClauses = '';
        
        for (String fieldName : filterFields.keyset()) {
            // Escape single quotes on the filter value to avoid SOQL injection.
            String filterValue = String.escapeSingleQuotes(filterFields.get(fieldName));
            andClauses += ' and ' + fieldName + ' like \'%' + filterValue + '%\'';
        }
        
        return andClauses;
    }

*/

 

 

Hi there trying to extract my orgs fields with all the properties i,e. data type and if a picklist the values. I have found an app called cloud converter that does pretty much all i need apart from the description field, which we use heavily. Can anyone help me create an extract to get this info.

 

Thnaks in advance

 

Paul

We have a need to compile a dictionary of all our fields labels, names, definitions, help text, type and properties i.e. picklist values. I believe I can export the metadata from Salesforce but not sure how to do this and what to do with it once it is out. Can anyone help with thsi please?

 

Thanks

We want to restrict certain phone numbers from being entered in Salesforce.  For example, 999-999-9999, to get around validity checking on format, etc.  What is recommended for doing this?

  • December 03, 2012
  • Like
  • 0