• sssssss
  • NEWBIE
  • 125 Points
  • Member since 2011

  • Chatter
    Feed
  • 4
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 34
    Replies
Hi,

I have a fomula field on a custom object called as "Campaign topic "  which is not firing and throwing the following error


formula text is exceeded  Char limit


Let me know how to fix it or we just create another formula and concatenate in this Campaign topic formula?


Kindly help me pls

Thanks in Advance
MY FORMULA FIELD :


IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Cloud"), "Cloud; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Communications"), "Communications; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Connected Machines"), "Connected Machines; ", NULL)+
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Core Network"), "Core Network; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "CPE"), "CPE; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Data Center Services"), "Data Center Services; ", NULL)+
IF(INCLUDES(Campaign_Name__r.Campaign_Topic__c , "Machine-to-Machine Pro Serv"), "Machine-to-Machine Pro Serv; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Managed Solutions"), "Managed Solutions; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Med Bus Bundle"), "Med Bus Bundle; ", NULL)+
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Mobility Solutions"), "Mobility Solutions; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Net Conferencing Services"), "Net Conferencing Services; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Other"), "Other; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Parent - Multi"), "Parent - Multi; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Partner"), "Partner; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Professional Services"), "Professional Services; ", NULL)+
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Security Solutions"), "Security Solutions; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Strategic Network"), "Strategic Network; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Thought Leadership"), "Thought Leadership; ", NULL)

 
Suddenly get above error when clicking custom button "Add Coverages" on page https://tomtom--config.cs3.my.salesforce.com/a1IQ0000002zpKY, which calls a custom page. 
This has been working before.

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com! 

Error ID: 1427357906-6440 (1257850963)
 

Hello,

 

How can I get quickly easily the list of fields displayed in a page layout.

My problem is i've this contact object with a lot of fields in it owned by differents apps but I need quickly to get just thus present in a special page layout.

Thanks for your help

Hello,

 

How can I check if the current user firing the trigger is admin or not?

 

Thanks

Hi,


I have deployed my community and site from one sandbox to another but somehow the page editor in the community builder in the destination org does not show any components to drag on to the pages. It shows the pages correctly. All the lightning components are deployed correctly as I can see them in the developer console. 

Can anyone please indicate what could be the problem?

Thanks for your help :)

Sumit
Hi,

We are trying to implement SSO using Facebook credentials. When we use the SSO URL, it redirects us to the FB login screen, where when we enter our credentials, it gives an error. Screenshot attached. Does anyone have any idea how to resolve it?
When I check the debug logs, it is inserting the contact, inserting the user, but then fails with this error, giving no other information in the debug log.
User-added image
Any suggestions welcome :-)

Hi,

 

I have created a formula field on Contact , which gets calculated as given :

 

IF( (RecordType.DeveloperName== 'Continuum_Member' && (AA_CM_A_Type__c == '1CM' || AA_CM_A_Type__c == '2CM')), 
HYPERLINK("/"&LEFT(Corps_Region__c,18), Corps_Region__r.Name,'_self'), 
HYPERLINK("/"&LEFT(Hire_Credit_Region_New__c,18), Hire_Credit_Region_New__r.Name,'_self') 
)

It always shows correct value when checked on detail page on record But whenever report is run , it always evaluates to false  and gives incorrect result.

Please help me to understand this behaviour whenever reports run.

 

Hi,

 

 

I need to put a hyperlink to a VF page, or a URL in the error message for a validation rule. Please help me if anyone of you has done this or have some ideas which can achieve this.

 

Thanks

Sumit

  • September 25, 2013
  • Like
  • 0

Hi,


I have a multi step approval process in place for Opportunity object.
The record gets locked When the opportunity is submitted for approval.
There is a group of users which needs to edit the opportunity records, irrespective of what the stage is. They should be able to edit the fields whether they are just submitted for approval, or in approved stage.

If we unlock the record during approval, it would be editable by all the users. But we need to restrict the editable property only to that particular group pf users.


Please let me know if you know of any method which can do this..or let me know if you need to know anything else.

 

Thanks.
Sumit

 

  • September 25, 2013
  • Like
  • 1

Hi,

 

 

I have 2 custom objects, Customer and Call Log. There's a lookup from Call Log to Customer. So, i have a related list 'Call Logs' on Customer detail page.

 

I have overriden the 'New' button on the related list, so when now the button is pressed, it redirects to the actual new record creation page, and also auto populates some values, including the lookup field to Customer with the name of the customer.

 

The code behind the button is:

 

/a07/e?CF00NA0000006AZ2f={!Customer__c.Name}&retURL=%2F{!Customer__c.Id}&RecordType=012A000000177i9&ent=01IA0000001TSOU

 CF00NA0000006AZ2f = the lookup field id (retreived from firebug)

 

Scenario:

 

Now, it works absolutely fine. But the thing is, since i am populating the lookup field with the name, if there are 2 customers by the name of "ABC", then both appear in edit page lookup field dropdown. The user is given an option to select one, and he, if sees the same name can select the incorrect one also.

 

 

Can anyone help me with this please?

 

Thanks,

Sumit

I have a custom link on a custom object Customer, which is an on click Javascript.

 

This link redirects to a new record page of another object MM Account based on some condition, and it pre-populates Customer.name in a field on the redirected page. 

Following is the code for the button:

 

if( (({!Customer__c.MMAccountHolder__c}) == false) )
{
	var str = '{!Customer__c.Name}';
	str.replace("\"", "\\\"");
	window.location="/a0B/e?retURL={!Customer__c.Id}&00NA0000006AZ4u={!Customer__c.Customer_Number__c}&CF00NA0000006AZ4p="+str+"";
}
else
{
             window.location="/{!Customer__c.MMid__c}";
}

 It works fine when usually, but whenever there is a single quote in the customer name, it gives a javascript error, "expected ; "

 

I have in past, handled double quote, but cant seem to handle the single quote.

 

Can anyone please look into this.

 

Thanks for any help.

 

~Sumit

  • September 19, 2011
  • Like
  • 0

There are some fields in Lead object; namely 

1 month prior value

2 month prior value

3 month prior value 

and so on...

 

Now the users want to extract out monthly reports but want the fields displayed out in a dynamic manner:

Suppose, we are running the report in August,

 

the fields should be displayed as:

1 month prior value ----> July value

2 month prior value ----> June value

3 month prior value ----> May value

and so on...

 

When running the report in December,

and so on...

 

the fields should be displayed as:

1 month prior value ----> November value

2 month prior value ----> October value

3 month prior value ----> September value

and so on...

 

 

They somewhat like to have dynamic labels according to the month they are generating the reports.

 

Please if anyone has any clues; I'll be grateful to you.....

 

Thanks,

S

Hi,

We are trying to implement SSO using Facebook credentials. When we use the SSO URL, it redirects us to the FB login screen, where when we enter our credentials, it gives an error. Screenshot attached. Does anyone have any idea how to resolve it?
When I check the debug logs, it is inserting the contact, inserting the user, but then fails with this error, giving no other information in the debug log.
User-added image
Any suggestions welcome :-)

Hi,


I have a multi step approval process in place for Opportunity object.
The record gets locked When the opportunity is submitted for approval.
There is a group of users which needs to edit the opportunity records, irrespective of what the stage is. They should be able to edit the fields whether they are just submitted for approval, or in approved stage.

If we unlock the record during approval, it would be editable by all the users. But we need to restrict the editable property only to that particular group pf users.


Please let me know if you know of any method which can do this..or let me know if you need to know anything else.

 

Thanks.
Sumit

 

  • September 25, 2013
  • Like
  • 1
Hi,


I have deployed my community and site from one sandbox to another but somehow the page editor in the community builder in the destination org does not show any components to drag on to the pages. It shows the pages correctly. All the lightning components are deployed correctly as I can see them in the developer console. 

Can anyone please indicate what could be the problem?

Thanks for your help :)

Sumit
Hi,
i have to display no of holidays in a month/year through apex triggers .i am failed to display holidays .Tell me where can i make a mistake in class or trigger.please tell me the solution.
Thanks
Galeeb SK

apex class:

public class calculateWorkingDaysBetweenTwoDates{

public Integer WorkingDaysBetweenTwoDates(Date date1,Date date2){

               List<Holiday> holidays=[Select h.StartTimeInMinutes, h.Name, h.ActivityDate From Holiday h];

                Integer allDaysBetween = date1.daysBetween(date2);
                Integer allWorkingDays=0;
                for(Integer k=0;k<allDaysBetween ;k++ ){
                    if(checkifItisWorkingDay(date1.addDays(k),holidays)){
                        allWorkingDays++;
                    } 
                }

                return allWorkingDays;

      }

public boolean checkifItisWorkingDay(Date currentDate,List<Holiday> holidays){
                 Date weekStart  = currentDate.toStartofWeek();
                for(Holiday hDay:holidays){
                        if(currentDate.daysBetween(hDay.ActivityDate) == 0){
                                 return false;
                        }
                }
               if(weekStart.daysBetween(currentDate) ==0 || weekStart.daysBetween(currentDate) == 6){
                       return false;
                } else 
                       return true;
  }
  }

apex trigger:

trigger days on Holiday__c (after insert) {

//for(Holiday__c h2 : trigger.new){

 if(trigger.isInsert){
 
calculateWorkingDaysBetweenTwoDates.WorkingDaysBetweenTwoDates();


}
}
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 all

Is there a validation rule I could develop which will lock a task record except for certain roles? 

So an error condition formula which stipulates which specific roles have editing access?

Thanks
Hi,

Any idea on how to render a vf component using a commandbutton? I would like to display a pop-up window when the button is clicked. I created a vf component for the pop-up window but have no idea on how to associate it with a command button/link

Thanks!
  • August 17, 2015
  • Like
  • 0
Hi,

I have a fomula field on a custom object called as "Campaign topic "  which is not firing and throwing the following error


formula text is exceeded  Char limit


Let me know how to fix it or we just create another formula and concatenate in this Campaign topic formula?


Kindly help me pls

Thanks in Advance
MY FORMULA FIELD :


IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Cloud"), "Cloud; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Communications"), "Communications; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Connected Machines"), "Connected Machines; ", NULL)+
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Core Network"), "Core Network; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "CPE"), "CPE; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Data Center Services"), "Data Center Services; ", NULL)+
IF(INCLUDES(Campaign_Name__r.Campaign_Topic__c , "Machine-to-Machine Pro Serv"), "Machine-to-Machine Pro Serv; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Managed Solutions"), "Managed Solutions; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Med Bus Bundle"), "Med Bus Bundle; ", NULL)+
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Mobility Solutions"), "Mobility Solutions; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Net Conferencing Services"), "Net Conferencing Services; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Other"), "Other; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Parent - Multi"), "Parent - Multi; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Partner"), "Partner; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Professional Services"), "Professional Services; ", NULL)+
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Security Solutions"), "Security Solutions; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Strategic Network"), "Strategic Network; ", NULL) +
IF(INCLUDES( Campaign_Name__r.Campaign_Topic__c , "Thought Leadership"), "Thought Leadership; ", NULL)

 
Get all accounts that do not have any open opportunities by soql code??
I have 4 record types ( Business1, Business2, Business3, Business4). I want to prevent users from changing record type to Business4 from any other (Busiess1,2,3)

Please advise. Thanks 

​Banti 
  • August 13, 2015
  • Like
  • 0
Suppose two custom field Country(PickList) and State(Text). If in Picklist select U.S.A then state(text) field automatically assign value with "New York". But selecting any other country than U.S.A it should be blank
Suddenly get above error when clicking custom button "Add Coverages" on page https://tomtom--config.cs3.my.salesforce.com/a1IQ0000002zpKY, which calls a custom page. 
This has been working before.

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com! 

Error ID: 1427357906-6440 (1257850963)
 
I am a beginner at this, and have a fairly basic Trigger I am using.  It is achieving 94% code coverage (16/17).  When I try to deploy to production it fails with an error message of 0% code coverage.  Not sure how to increase to at least 1%.
Below is both my Trigger code and Apex Class Test code:

TRIGGER CODE:

trigger LeadConvert on Lead (after insert) {
 
    list<database.leadconvert> leadsToConvert = new list<database.leadconvert>();
    Database.LeadConvert lc;
    string convertedStatus = '';
    list<leadstatus> convertStatusList = new list<leadstatus>();
    convertStatusList = [Select Id, MasterLabel
                            from LeadStatus
                            where IsConverted=true limit 1];
    if(convertStatusList.size() > 0){
        convertedStatus = convertStatusList[0].MasterLabel;
    }else{
        convertedStatus = 'Closed - Converted';
    }
     
    for(Lead l : trigger.New){
        if(l.LeadSource == 'Web'){
            //This lead should be converted automatically to a Contact/Account
            lc = new database.LeadConvert();
            lc.setLeadId(l.ID);
            lc.setDoNotCreateOpportunity(true);
            lc.setConvertedStatus(convertedStatus);
            leadsToConvert.add(lc);
        }
    }
     
    list<database.leadconvertresult> lcrList = new list<database.leadconvertresult>();
    lcrList = Database.convertLead(leadsToConvert);
}


APEX CLASS TEST CODE:

@IsTest
public class TestConvertLead {
    static testmethod void convertLead() {
    
        Lead l = new Lead();
        
        l.FirstName = 'Jane';
        l.LastName = 'Doe';
        l.Company = 'Onassis Foundation (USA)';
        l.Email = 'senvas@aol.com';
        l.LeadSource = 'Web';
        
        insert l;
    }
}

Hello,
We have created site.com Community Site but now we would like deployed it in a new environment.
Is it possible to do it ?

I exported the site.com community site but I have had a file with .site extension. When I imported it in my new environment, the file went in Assets/documents... and I don't have the site...
Someone could help me please ?

Thanks in advance for your help,
Have a nice day,
Marion

 

Hi
can any one tell me regex form of 999-999-9999 this?

I have used phoneRegex = '\\D*?(\\d\\D*?){10} but Now I want to restrict the special charatcter entry. It is acepting all the  special characters

I am giving this input.It is taking, I want to restrict that.

how will I do, please give me some suggession as soon as possible.

 

 

Thanks

 

 

I'm a total newbie to writing controllers, but I would like to learn.

 

How do I sort a PageBlockTable?  I have read several posts on here and understand I need to use the ORDER BY statement but I'm lost how to implement it in a controller.

 

Please Help!

My Requirement is i have two pages in that one page have list of data if i select any one record that value to be display in page 2.

 

So i have created one controller (Apex Class) like below

 

public with sharing class Pages_Navigation 

    public Choosename chosenName;
public Choosename getChoosename()
{
    if(chosenName == null) chosenName = new Choosename();
    return chosenName;
}
public Job_Application__c[] getNumbers() 
{       
    try 
    {        
     
    Job_Application__c[] numbers = [select Name, Status__c  
                            from Job_Application__c order by Name limit :list_size 
                          offset :counter]; 
    return numbers;       
    } 
    catch (QueryException e) 
    {          
        ApexPages.addMessages(e);
        return null;       
    }    
}  
public PageReference step1() 
{    
    return Page.JAPage1;
}
public PageReference step2()
{   
    PageReference oPageRef = Page.JAPage2;
    oPageRef.setRedirect(true);
    oPageRef.getParameters().put('JobName',string.valueof(chosenName));
    return oPageRef ;   
}
public class Choosename
{
    public string Name {get;set;}
}
}

 

And Created pages like below

 

JAPage1............

 

<apex:page title="SOQL Offset Example Using Visualforce" controller="Pages_Navigation" showHeader="false" sidebar="false" readOnly="true" cache="false">
   <apex:sectionHeader subtitle="SOQL Paging Example" title="Job Application Table"/>
   <apex:form >
    <apex:pageBlock title="Job Application Page1">
      <apex:pageBlockButtons location="bottom">
          <apex:commandButton action="{!step2}" value="Next"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="Job Application Information">
          <apex:outputPanel id="jobName">
             <apex:detail subject="{!chosenName}"/>
          </apex:outputPanel>
      </apex:pageBlockSection>
   </apex:pageBlock>
  </apex:form>
</apex:page>

 

JAPage2.................

 

<apex:page title="SOQL Offset Example Using Visualforce" controller="Pages_Navigation" showHeader="false" sidebar="false" readOnly="true" cache="false">
   <apex:sectionHeader subtitle="SOQL Paging Example" title="Job Application Table"/>
   <apex:form >
       <apex:pageBlock >       
             
            <apex:pageBlockSection collapsible="false">   
                <apex:outputPanel id="myPanel">   
                    <apex:pageBlockTable value="{!numbers}" var="n" align="center">        
                        <apex:column >
                            <apex:outputLink value="https://c.ap1.visual.force.com/apex/JAPage1?Name={!n.Name}">{!n.Name}</apex:outputLink>
                        </apex:column>
                        <apex:column headerValue="Click">
                           <apex:commandLink value="{!n.Name}" rerender="https://c.ap1.visual.force.com/apex/JAPage1">
                              <apex:param name="chosenName" value="{!n.Name}" assignTo="{!chosenName}"/>
                           </apex:commandLink>
                        </apex:column>

                        <apex:column value="{!n.Status__c }" /> 
                         </apex:pageBlockTable>   
                </apex:outputPanel>
            </apex:pageBlockSection> 
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!step1}" value="Previous"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form> 
</apex:page>

 

But i am not getting value in JAPage 1 when i have selected from JAPage 2 list, please can help me on this its very urgent.

  • February 15, 2013
  • Like
  • 0