• SKollcaku
  • NEWBIE
  • 80 Points
  • Member since 2015
  • Senior Consultant
  • Deloitte Digital


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 13
    Likes Given
  • 10
    Questions
  • 11
    Replies

Hi everyone,

We have an Apex job/batch which executes each week and deletes all Contact records whith a certain condition (let suppose, ActivationDate__c older than 24-months).

How should I edit this Apex job in order to send automatically an Email to a Salesforce user whenever it finishes to comunicate the result (such as: success or failure/exception)?

 

Thank you so much,

Skender

Hi,

Maybe this is an already question, but I did not find the right one:
how can I know the user limits I can create in SFDC for a Salesforce edition license (Enterprise, Professional, etc)?

Thanks a lot,
Skender
Hi,

I have been trying ll possible alternatives to insert new Accounts with a field of type Date in csv file, but with no success.
I continue to get the fllowing error: Birthdate: invalid date: Fri Nov 07 00:00:00 GMT 27" (this is an example).

I tried to save the csv column as a text but nothing. I also added a suffix with csved tool (10:00:00 as a time). Any sugegstions how to import date fields with data loader (I have checked the flag: Use European date/time format )?
I am using Salesforce with gmt+2 date/time format.


Thanks a lot,
Skender
Hi,

I need to have a trigger to copy the value of a picklist from Account to its related Contacts (another custom picklist).
The requirement is only to be copied if in the Contact poage the picklist is empty.

I tried this trigger:
 
trigger UpdateContactRegione on Contact(before Insert, before Update) {

    for(Contact Cont: Trigger.new){

     Account acct = [select id,Regione__c from Account where Id=:Cont.AccountId];

       if(Cont.Regione__c == null)

                     
          Cont.Regione__c= acct.Regione__c;

     
       }

   }

But it worksonly if I change the picklist in Contact and not viceversa.

Any suggestions?

Thanks,
Skender
Hi,

I have some contacts who are related with one or more other contacts and so I ahve choosen to use the Person Account feature.
But how can I correlate the person account to the contacts (one person account could have one or more contacts and one contact could have only and only one person account)
Is it posibile to have Person Account related to one or more contacts?

Thanks,
Skender 
Hi,

I have one custom related list (which is the junction, so two master-detail fields, between one custom object and the Opportunities) and I need to have the possibility to create directly a New Opporunity from the lookup page (I see already the existing opportunities, but no way to create quickly a new one - as in the image).

User-added image 


Thanks alot,
Skender
Hi everyone,

I am trying (through workflows) to update automatically a standard field name (Industry in the Account tab) when a specific Account Type Record value is chosen.
Is there any way to manage this without code?
How can i acces to the field names using Apex classes in triggers?


Thanks a lot,
Skender
Hi,

I need to change automatically the label of a field based on the value of Account Record Type.
I tried with the workflow (validation rules), but I think it is not the right way to achieve this (I could only get messages, but not change the label of the other field). 
Where can i find such examples, maybe using triggers (or process build or flows?


Thanks,
Skender
Hi everyone,

I am wondering if there is a way to implement such task:
The need is to have in a custom object, let's say a "memo of a call", in which there exists a field where the several opportunities (already existing/inserted in Opportunities) are mentioned?

Any help would be great!


Thanks,
Skender
Hi,

I have two fields, let’s say A and B, of type Lookup Relationships and they are of cardinality 1-to-n (A could have more than one values of field B).
The business request is to have a new field which lists all the values of of B once A is selected. Both objects are Accounts and they are related to opportunities.
The aim is to have a report which visualizes the results…
 
Thanks in advance,
Skender
 
Hi,

Maybe this is an already question, but I did not find the right one:
how can I know the user limits I can create in SFDC for a Salesforce edition license (Enterprise, Professional, etc)?

Thanks a lot,
Skender
Hi. I have this error while completing the Analyze Your Data Over Time module for analytics.

I created a new Hands-On org and tried again. Still doesnt work.

There was an unhandled exception. Please reference ID: RNYKGLDU. Error: Faraday::ClientError. Message: 550: Lens State conversion has failed using converter insights.api.converters.DashboardState_V39r0_V40r0. Cannot open lens with new Wave Charts in API version below 40.0

Analyze Your Data Over Time - Trailhead Module Error

https://trailhead.salesforce.com/trails/wave_analytics_explorer/modules/wave_desktop_exploration/units/wave_analysis_over_time
Hello all, I receive the following message in Trailhead. I think that the exploration and filter are set up properly. I don't know what I am doing wrong. Would you please help?
Hi,

I have been trying ll possible alternatives to insert new Accounts with a field of type Date in csv file, but with no success.
I continue to get the fllowing error: Birthdate: invalid date: Fri Nov 07 00:00:00 GMT 27" (this is an example).

I tried to save the csv column as a text but nothing. I also added a suffix with csved tool (10:00:00 as a time). Any sugegstions how to import date fields with data loader (I have checked the flag: Use European date/time format )?
I am using Salesforce with gmt+2 date/time format.


Thanks a lot,
Skender
Hi,

I have some contacts who are related with one or more other contacts and so I ahve choosen to use the Person Account feature.
But how can I correlate the person account to the contacts (one person account could have one or more contacts and one contact could have only and only one person account)
Is it posibile to have Person Account related to one or more contacts?

Thanks,
Skender 
Hi,

I have one custom related list (which is the junction, so two master-detail fields, between one custom object and the Opportunities) and I need to have the possibility to create directly a New Opporunity from the lookup page (I see already the existing opportunities, but no way to create quickly a new one - as in the image).

User-added image 


Thanks alot,
Skender
Hi,

I need to change automatically the label of a field based on the value of Account Record Type.
I tried with the workflow (validation rules), but I think it is not the right way to achieve this (I could only get messages, but not change the label of the other field). 
Where can i find such examples, maybe using triggers (or process build or flows?


Thanks,
Skender
Hi,

I have two fields, let’s say A and B, of type Lookup Relationships and they are of cardinality 1-to-n (A could have more than one values of field B).
The business request is to have a new field which lists all the values of of B once A is selected. Both objects are Accounts and they are related to opportunities.
The aim is to have a report which visualizes the results…
 
Thanks in advance,
Skender
 
Hello folks,
Is there a defined approach or a way to integrate salesforce with mainframes systems ?? Any hints or directions will be helpful.



Thanks,
Arun



Hi. I have this error while completing the Analyze Your Data Over Time module for analytics.

I created a new Hands-On org and tried again. Still doesnt work.

There was an unhandled exception. Please reference ID: RNYKGLDU. Error: Faraday::ClientError. Message: 550: Lens State conversion has failed using converter insights.api.converters.DashboardState_V39r0_V40r0. Cannot open lens with new Wave Charts in API version below 40.0

Analyze Your Data Over Time - Trailhead Module Error

https://trailhead.salesforce.com/trails/wave_analytics_explorer/modules/wave_desktop_exploration/units/wave_analysis_over_time
Hello all, I receive the following message in Trailhead. I think that the exploration and filter are set up properly. I don't know what I am doing wrong. Would you please help?
Hi.  I am trying to assign a queue as the case owner.. In a Case Before Trigger, I am have the following.  The case owner is getting updated if the abm__c field is populated.. however, it does not get updated with the queue if that field is null.

Account_Team__c at = aMap.get(c.AccountId);
                // Only change the owner if the Account Team has
                // an ABM and the ABM is an active user. Once assigned
                // set the flag Assigned to ABM
            if (string.isNotBlank(at.abm__c)) {
                if (at.abm__r.IsActive) {
                    c.ownerid = at.abm__c;
                    c.Assigned_To_ABM__c = true;                    
                }
             }
              else {
                c.ownerid = abmQueue[0].Id;
                }

Any help woudl be greatly appreciated!!

Fred
  • October 12, 2016
  • Like
  • 1
Hello,

I am using joined report

Is it possibel to take a screenshot of a report (or converting report in to pdf)and get it in apex.

I will later use it to email by scheduler

thank you
  • September 23, 2015
  • Like
  • 1

Hello!  I am looking for some help copying a custom field from one location to another.

 

We are using the products tab within the Enterprise Edition and I have created a custom picklist field called AC Input on the products detail page.  I would like to have the chosen picklist value on the product detail page be copied over and visible on the quote line item related list on the quote detail page.  For example, the part number field within products detail page, as provided by Salesforce, already does this.


Can anyone help me?

 

Thanks,

Dave

Hello !

 

I have begun a trigger to copy on the Actions page (Opportunity page) ,the picklist values of 3 fields from the Account related list

 

But I meet troubles to do the mapping.

 

I can't map the AccountId field from Oppty(Actions), I have the following error :

 

Error: Compile Error: Illegal assignment from Schema.SObjectField to String at line 30 column 10 

 

Here here my code... I have done my best using other existing triggers in my org but it is probably wrong...

 

Trigger UpdateIndustrySegmentSubSegment on Opportunity (Before insert,Before Update) 
{
    // Initialise ID maps for related sObjects
    map<Id, Account> mapAccount   = new map<Id, Account>();
    
    // Fill the Id -- > sObject maps for Accounts
  for(Account[] arrAccount: [
                                    select  Id,
                                            Name,industry__c,segment__c,sub_segment__c
                                    from    Account
                                   where   id in :mapAccount.keySet()
                                ])
   {
        for(Account sAccount : arrAccount)
        {
            mapAccount.put(sAccount.Id, sAccount);
        }
    }
    
   for(Opportunity sOppty : trigger.new)
    {
        
        Account  thisAccount   = mapAccount.get(sOppty.Account.Id);
 
        if(
        sOppty.Business_group__c == 'Amcor Flexibles Europe & Americas' && 
        //thisAccount.industry__c != null && 
        sOppty.RecordTypeId != '012200000002HdgAAE')
        
        {sOppty.industry__c = Account.industry__c;
        sOppty.segment__c = Account.segment__c;
        sOppty.sub_segment__c = Account.sub_segment__c;}
  
    }
}

 Thanks a lot for your help

Hi,

 

I want to fetch the list of label names for all the fields of an Object....I got some code to get field labels of an Object 

 

i.e. <apex:column title=”{!$ObjectType.OpportunityLineItem.fields.Quantity.label}” headerValue=”{!$ObjectType.OpportunityLineItem.fields.Quantity.label}” width=”50px”>

 

But I want to get the list of all field labels by Apex..

I got the API name of all fields like this 

 

 String type='Account';

Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
Schema.SObjectType leadSchema = schemaMap.get(type);
Map<String, Schema.SObjectField> fieldMap = leadSchema.getDescribe().fields.getMap();


for (String fieldName: fieldMap.keySet()) {

System.debug('##Field API Name='+fieldName);// list of all field API name
}

 

 

 

But I need to get the label name..

 

Please help

  • January 20, 2012
  • Like
  • 1

Is there any way to rename a standard field? For example if I wanted to give the Activity Task field "Subject" a different name. Previous forum question seem to talk about changing the tab names via "Tab Names and Labels" but that's not what I'm looking for.

Simply put the following formula into a formula field of type "Text":

 

Id
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
    IF(FIND(MID(Id,1,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
    +IF(FIND(MID(Id,2,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
    +IF(FIND(MID(Id,3,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
    +IF(FIND(MID(Id,4,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
    +IF(FIND(MID(Id,5,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
    )+1,1)
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
    IF(FIND(MID(Id,6,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
    +IF(FIND(MID(Id,7,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
    +IF(FIND(MID(Id,8,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
    +IF(FIND(MID(Id,9,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
    +IF(FIND(MID(Id,10,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
    )+1,1)
& MID("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",(
    IF(FIND(MID(Id,11,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,1,0)
    +IF(FIND(MID(Id,12,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,2,0)
    +IF(FIND(MID(Id,13,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,4,0)
    +IF(FIND(MID(Id,14,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,8,0)
    +IF(FIND(MID(Id,15,1), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0,16,0)
    )+1,1)

 

This is an optimized version of the code example "BPS: 18 digit external ID within the UI" you can find on the Online Help, but unlike the example provided there, it is small enough to fit into a formula field. Also, this code doesn't contain the error found in the online help example, where the second character byte equivalent of the first 5-character chunk was "4" instead of "2". I'd be more than happy if someone could come up with an even shorter version of this formula...Still, I hope you can use this.

 

Cheers,

Erik Mittmeyer

Hello All,

 

Is there a way that I can automatically create a PDF document from a report in Salesforce?  I believe that it can be done via a visualforce page?   OR can a custom button be created and added to the page that you can click on to create a PDF?  Please advise.

 

Thanks,

 

Phillies Fan

Hi all,
 
Just getting started on force.com coding, I have run into a first problem: How do I create a multi-select lookup relationship between two custom objects? What I would like to have is basically a multi-select picklist, which is populated with the names of another cucstom object, so essentially creating a one-to-many relationship between my two custom objects.
How could I achieve this? Thanks a lot in advance.
 
Kind regards,
 
Martin
How do I export a single contact from Salesforce to Outlook. Is there any way to quickly export a contact as a VCF.
  • September 12, 2007
  • Like
  • 1