• sfdcFanBoy
  • NEWBIE
  • 174 Points
  • Member since 2008
  • Salesforce Certified Professional


  • Chatter
    Feed
  • 5
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 42
    Questions
  • 152
    Replies
I have a text box and few checkboxes on the page. If the user enters,changes existing text,clciks or unclicks the checkbox and clicks the cancel button or navigates away from the page I want a pop-up message saying yor changes have not been saved
  • April 13, 2017
  • Like
  • 0
I have the formula field that based on the picklist selection it will populate the appropiate time. Using the picklist is limited and would like to use checkboxes so that way for each checbox checked it will calculate the time that way i.e checkbox 1 10min, checbox 2 60min = 70min. Hopefully this makes sense. Here is the formula field with picklist im working with.
 
Case( Stop_Complexity__c,
"Easy",15,
"Moderate",30,
"Difficult",90,
null)

 
Hi, I'm starting a specific post for this topic. 

I'm getting the following message on step 9. 

Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

It is ironic to get to the end and get stuck on charts which I do all the time. :) Ok, here are the instructions:

Give sales reps a visual indicator to compare product performance. First, create a summary report on opportunities named Opp Stage by Adventure. Filter it by Product Date within the past year. For the purpose of this superbadge, assume this date range is 1/1/2026-12/31/2026. Second, add a stacked vertical bar chart of the number of explorers by product name, grouped by stage, to your summary report. Finally, add this chart to your Lightning Adventure Record Page with the label Adventure Stage Comparison. To ensure that this chart isn’t accidentally displayed to customers, add it to a new section called Adventure Comparison.

And, here is what I have. 

I have a Summary Report of "Opportunities with Adventures". In the data model, each Opportunnity corresponds to 1 Explorer from what I can tell per the data model. I've grouped the report by adventure and stage. I have not grouped by Explorer (which is a Contact Role on each Opportunity). I have tried that though and still got the same error. Note also that I'm using "Adventure Date" instead of Procuct Date per the instructions since Product has been renamed to Adventure. 

Opp Stage by Adventure Report



Chart Editor

In the Lightning Record page for Adventure, I've created a custom tab called "Adventure Comparison" and added in the chart called " Adventure Stage Comparison". I've also tried flipping those names, but I still got the same error. 

Adventure Chart in Lightning Record

Any hints would be appreciated. :)
Bug in Lightning Specialist Superbadge step 6? - Automate fulfillment cancellation actions.   
 
The task is when fulfillment is Cancelled, the related OpportunityLineItem unitprice (i.e., salesprice) should be same as the Fulfillment's Deposit. Simple. I manually checked this and is working fine, but when the app checks, it fails with the error : System.AssertException: Assertion Failed: Same value.  
 
ISSUE: Now, if I see the debug logs (captured when Salesforce trailhead checks this).  In below snippet (from debug logs) see the last 2 lines.  There is assertEquals which checks deposit and unitprice - Match.  But assertNotEqual is also checking deposit and unitPrice.  It fails here.  Both the values will be same, the assertNotEqual is failing because both the values are same!
 
Execute Anonymous: // make sure the deposit matches the unit price
Execute Anonymous: System.assertEquals(f1.deposit__c, oli1.unitprice); // one way in the future
Execute Anonymous: System.assertNotEquals(f2.deposit__c, oli2.unitprice); // one way in the past

How to fix this? Is this a bug?
I have "Items" object with different statuses. I need to get the following output with single soql query.

Ordered Items: 10 
Cancelled Items: 3 
Reviewed Items: 2

VF Page and apex code below:
 
Ordered Items: <apex:commandButton value="{!Count}"/> 
Cancelled Items: <apex:commandButton value="{!Count}" /> 
Reviewed Items: <apex:commandButton value="{!Count}"/> 


Public Integer Count(){ 
        List<Items__c> items = [SELECT Count(ID) FROM Items__c WHERE Status == 'Ordered' OR Status == 'Cancelled' OR Status == 'Reviewed']; 
        return items.size(); 
}



With the above code ofcourse, I get the following output

Ordered Items: 15 
Cancelled Items: 15 
Reviewed Items: 15

Im calling the same method here, but I want to return differently based on the Status. I tried to use apex:param for the commandButton, but doesn't work.

Any ideas how to implement. [I want to use only 1 SOQL, with different SOQL and different methods, I can get what I want]

Im getting the following error

System.QueryException: unexpected token: '{'

here's the simple code.
Set<Id> sId = new Set<Id>{};
sId.add('a0df000000063A9AAI');
sId.add('a0df00000006P2cAAE');
String squery = 'SELECT Id, Name FROM Engagement__c  WHERE Id IN:'+sId;
List<Engagement__c> lst = database.query(squery);   
System.debug('----list size:'+lst.size());


I have a pageblock with 2 columns and a ceckbox column.. when I select the checkbox, the value is not being captured. Yes im using the wrapper class as per the salesforce example. 

In my code, the list "selectedEngs" is empty.  To this list, Im adding the selected rows.  But the size is zero, even after checkbox is ticked.

Did I miss anything, below is my code.  Please let me know.


VF Page: 2 columns. one is checkbox
<apex:repeat value="{!Engagements}" var="item">

<apex:pageBlockSection id="Selected_PBS" columns="3" >                                                                          <apex:outputPanel layout="block">
             <label>Program</label>
             <apex:outputText value="{!item.eng.Program__c}"/>
        </apex:outputPanel>
                                
        <apex:outputPanel layout="block">                              
              <apex:inputCheckbox value="{!item.selected}" id="checkedone">
              <apex:actionSupport event="onclick" action="{!GetSelected}" rendered="false"/>                                          </apex:inputCheckbox>
         </apex:outputPanel>                                                           
 </apex:pageBlockSection>

</apex:repeat>


Apex class
List <Engagement__c> selectedEngs = new list<Engagement__c>();
List<EngagementWrapper> engList = new List<EngagementWrapper>();
     
     public PageReference getSelected()
     {
        selectedEngs.clear();
        for(EngagementWrapper engwrapper : engList)
        {
        if(engwrapper.selected == true)
        selectedEngs.add(engwrapper.eng);
        }
        return null;

    }
    public List<EngagementWrapper> getEngagements()
    {    
        engList.clear();
        for(Engagement__c e : studentList)
        engList.add(new EngagementWrapper(e));

        return engList;

    }
    
      public List<Engagement__c> GetSelectedEngs()
     {
        if(selectedEngs.size()>0)
        return selectedEngs;
        else
        return null;
     }


Cheers!

Hey All,

 

I have 3 maps of type <String,Decimal>.  And the values are as below

 

m1 -  {x1,a1;  x2,a2;  x3,a3}

m2 -  {x1,b1;  x2,b2;  x3,b3}

m3 -  {x1,c1;  x2,c2;  x3,c3}

 

All the strings(keys) in all the maps are same. x1, x2, x3.

 

I want to make a new map M of type <String,decimal,decimal,decimal> and the values should be

 

{

x1,a1,b1,c1;

x2,a2,b2,c2;

x3,a3,b3,c3;

}

 

How to achieve this?  any logic please

Hi All,

 

I have standard enterprise edition salesforce licenses.  Users are now using it through browser on desktops/laptops.

 

Now, we are moving to mobile.  We would like to use Salesforce Touch App in IPhone because we need to edit custom object records also via phone. 

 

So, for Salesforce Touch iOS app, do we need a separate license? or the current enterprise edition salesforce license is good enough for the mobile app too?

 

Please let me know

 

Note: I have enabled the Salesforce Touch downloadable app for iPhone in Salesforce (Mobile Administration --> SalesforceTouch settings).

Hi All,

 

I have an aggregateResult query, which calculates the AVG of 'Segment' value (a field).  

 

There are 4 records with Segment values as 100, 0, 0, 0.  Ideally, the average should be 25 (100+0+0+0/4).  But, the query is calculating the avegare as100.  Since the values are 0s for 3 records, the query is not considering them. It is taking as 100/1= 100.

 

When the records have values, it is working fine. Ex: 100,50,50,100 - The avergare is correctly showing as 75.

 

How do I make it to display correct Average?  Below is the query.

 

AggregateResult[] groupedResults    = [Select Customer_Name__c,AVG(Segment__c) FROM Customer__c GROUP BY Customer_Name__c];

 

Please help.  Thanks.

Hi All,

 

I have an enterprise edition of Salesforce currently shown in English Language to all.

 

Now, we would like to extend this to few Chinese Users, but the screens/layouts/field names have to be in Chinese language for these 20 new users (Note that these 20 new users belong to 5 different profiles/roles and they will be accessing it from China). 

 

Can anyone please brief me, what are the areas I need to take into consideration for the language change and how do I start with? Below are my few questions.  But please do let me knwo others aspects that I need to look into?

 

- Can language be changed for an entire profile/role ? Or is it specific to each user? (I think it is user based.  Please confirm). What are the steps to follow?

- Can I mass change the language settings of certain users?

- Apart of changing the language settings, what other settings do I need to change?

- Once I change the language settings, all the fields(standard and custom) of all the objects (standard and custom) will be directly translated? or do I need to manually change few fields?

- Can I include the new users in existing profiles/roles? (The only difference the new users have is that they need to see the screens in Chinese and i will add few sharing rules to give access to data)

 

Please explain.  Thanks. 

Hey All,

 

I have a map 'm' <String,Decimal> with Values

 

{

 'abc',1000;

 'xyz', 200;

 'abc',100;

 'qwe',600;

 'qwe',800;

}

 

I need to add up the values if the key matches.  So the map should be like below after processing the above map

Abc and qwe are repeating, for them the values should be added. (abc: 1000+100 and qwe: 600+800)

 

{

'abc',1100;

'xyz', 200;

'qwe',1400;

}

 

How to achieve this?

Hi All,

 

I have created a vertical bar chart in visualforce page without any issues.  Now I would like to do the same with 'horizontal' orientation.

 

What changes do I need to make apart from changing the Orientation,xField,yField to make a vertical chart to horizontal one?

 

Below are the 2 codes and outputs.

VERTICAL

<apex:chart height="250" width="350" data="{!GenerateChart}"> 
            <apex:axis type="Numeric" position="left" fields="data" title="MT WON" />    
            <apex:axis type="Category" position="bottom" fields="name" title="Month"/>            
            <apex:barSeries orientation="vertical" axis="left" xField="name" yField="data" /> 
        </apex:chart>
        

HORIZONTAL
        <apex:chart height="250" width="350" data="{!GenerateChart}"> 
            <apex:axis type="Numeric" position="left" fields="data" title="MT WON" />    
            <apex:axis type="Category" position="bottom" fields="name" title="Month"/>            
            <apex:barSeries orientation="horizontal" axis="left" xField="data" yField="name" /> 
        </apex:chart>

 

 The horizontal one is weird! 

 

http://i44.tinypic.com/2rqj1o2.jpg

 

Let me know.  Thanks

Hi There,

 

I have created a flow which basically takes feedback from the user with different questions in different screens.  All the responses are captured in Salesforce object.  This is all fine.

 

How do I make this flow publicly available, I dont want users to login to Salesforce to access this feedback flow.  This is more like a survey, so I would like to place it in my website, but the responses still need to be captured with in Salesforce for our review.

 

Any thoughts?

 

Thanks!

Hello All,

 

I have the below aggregate Results query which is working fine.

 

public List <AccountPDF> getAccountsSnapshotYearly(){

    AggregateResult[] groupedResults = [SELECT Customer_Name__c,MAX(Segment__c),SUM(Load_Count__c) FROM Snapshot__c GROUP BY Customer_Name__c ORDER BY Customer_Name__c ASC];
       
        for (AggregateResult ar : groupedResults)  {
                                   
            snapshotResult.add(new AccountPDF(String.valueOf(ar.get('Customer_Name__c')), String.valueOf(ar.get('expr0')), String.valueOf(ar.get('expr1'))));
        } 
     return snapshotResult;
        
    }

 

The result of the above code is something like this.  Grouped and ordered by Customer Name.

 

Customer Name      Max(segment)             sum(load count)

ABC                                          7                                    40

XYZ                                           3                                    10

CAB                                          2                                    30

QWE                                        9                                    20

 

Now I want to order/sort this table by Sum(load count) - Should display in this order 10, 20, 30, 40 of load count. not in customer name order.

 

But when I include that 'ORDER BY Load_Count__c' in the aggregate result query, it throws error - Ordered field must be grouped or aggregated: Load_Count__c.  The Load_Count__c field is already aggregated in the query but still it shows the same error. 

 

Cant we order by an aggregated field?

 

Any other alternatives available?

Hi All,

 

Below is the code for Counting the no of events for a particular Account.

 

for(Account Acc: [SELECT Id,(SELECT Id,WhatId FROM Events) FROM Account WHERE Id=:'xxxxxxxxxx']){
        intMgmtEngmtCount=0;        
        for(Event e:Acc.Events){
            intMgmtEngmtCount+=1;        
        }        
}

 

But this Count doesn't include all the relevant Events.  This count includes only those Events where 'Related To' field of Event is Customer or 'Name' field contact belongs to this customer.

 

Example:

I have an Account "ABC" and a contact under it - Mr.X. I have created an event for the customer 'ABC' using the 'New Event' button in open activities related list.

 

There are 2 fields of concern in Events. One is 'Related To' and other is 'Name'.

 

For this event, I have chosen, Related To as 'ABC' account and Name as 'Mr.X'. By doing this, this event appears in Customer page itself in the Open activites related list. So, the count is 1 (as per the code and also in activities related list), which is correct.

 

If I change, the 'Related To' an opportunity say, 'XYZ', the activity still appears in 'ABC' customer page because, Mr.X belongs to 'ABC' account. But through the above Code, the count is "0" even though it appears in customer page open activities related list.

 

How do I get the count of all these? So the code has to check for Related To and Name fields and see if the opportunity or Contact belongs to that customer and then count. How can I do it through inner join ?

My overall apex code coverage is 86% in production (With around 35 apex classes and triggers).

 

Now when I am trying to deploy 3 new classes with the code coverages of (100, 88 and 9),  it is throwing the error.

 

Average test coverage across all Apex Classes and Triggers is 73%, at least 75% test coverage is required.

 

Why is the overall coverage dropping to such a low %.  How is it calculated?

 

Im struggling to increase the percentage for 9% covered apex class.  Is there any way to deploy it ?

 

Also, I have tried adding 2 dummy classes with test classes of both 100%, still it remains at 73% ! 

 

Any workaround?  Let me know.

 

Thanks!

Need help in writing test class for class that makes webservice callout. Only the dummy response part isn't working.
 
As suggested by other users, I have created a static variable in test class and used it in the original class also. So, while running the test class, the callout is by-passed successfully.
 
Below is the code coverage part. As you can see in the image, I am successfully by-passing the callout in Line 120.
But from Line 127 onwards, it is not covered as responseList is empty.
 
 
 
I have created the dummy response in the test class. Is this the correct way of creating the dummy response? Or do I need to make any changes in creating dummy response?
 
Here's the test class code.

Test.StartTest(); 
 
//setting the static variable to true, so it wont enter in the real webservice class
BatchKeyAccountsWS.testmode_con=true; 
 
//calling the webservice class
BatchKeyAccountsWS d = new BatchKeyAccountsWS('select id FROM Account Order by CreatedDate DESC LIMIT 1'); 
ID scheduleC = Database.executeBatch(d,1);
 
//instantiating the wsdl2apex class
nshSalesforce.SF_InPort stub = new nshSalesforce.SF_InPort(); 
 
//Creating dummy response List
List<nshSalesforce.Item_element> responseList = new List<nshSalesforce.Item_element>(); 

nshSalesforce.Item_element response = new nshSalesforce.Item_element();
response.ZTERM='1000';
response.PP='1000';
response.GUEBG=System.today();
responseList.add(response);
 
Test.StopTest();

 

 Please help
 

I have a batch class with callouts made to external webservice in the execute method.  A schedular class passes records to this batch class at batch size of 1.

 

I am trying to write test method only for batch class.  How do I call webservice methods inside the execute method?  I used database.executeBatch method in test method, it covers part the execute method.. but stops at the line where the  webservice call is made.

 

This is the webservice call made in the execute method.  Passing the SoldCode to webservice and processing the response.  The 2nd line is not covered in the code coverage part as I am not sure how to call this in the test method.

 

SalesforceCom_Live.SFDSPort stub_DS = new SalesforceCom_Live.SFDSPort();
SalesforceCom_Live.SFResponse_SFDS response_difot = stub_DS.SFDS(SoldCode);

 SalesforceCom_Live is the Apex2WSDL Class.

 SFDSPort is the method that has the endpoint, request and response elements.

 SFResponse_SFDS is the response method in it.

 

In the test method, I have started with this.

Batch_DIFOT d = new Batch_DIFOT('select id .........);
ID scheduleDIFOT = Database.executeBatch(d,1);

 

How do I call the 2nd line to proceed ? 

 

help ?

 

Thanks.

I want to get the feed of all my followers in a single VF page.  So, I can send it to myself as a daily digest email. 

 

How do I do that?

Hi All,

 

I need to send an email with a PDF attachment.  I have developed a normal visualforce page (didn't render as PDF). And then using apex code, am getting the body of it, and sending it as PDF attachment.

 

I am receving the email with the PDF attachment, but when I try to open the PDF, it isn't opening.  It gives the following decode error - "Adobe reader cannot open the PDF because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)"

 

Below is the Apex class that is taking the body of vf page and making it a PDF attachment.  Please let me know if I am missing anything.  Thanks.

 

global class CustomersPDF_SendEmail implements Schedulable {

    global void execute(SchedulableContext sc) {    
        
        PageReference pdf = Page.CustomersPDF;
        pdf.getParameters().put('id','001O000000ECvg4');
     
        Blob body;
     
        try {
          body = pdf.getContent();
        } 
        catch (VisualforceException e) {
          body = Blob.valueOf('Some Text');
        }
     
        Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment();
        attach.setContentType('application/pdf');
        attach.setFileName('KeyCustomers.pdf');
        attach.setInline(false);
        attach.Body = body;
     
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        mail.setUseSignature(false);
        mail.setToAddresses(new String[] {'abc@gmail.com'});
        mail.setSubject('Customers PDF - Demo');
        mail.setHtmlBody('Check the attachment!');
        mail.setFileAttachments(new Messaging.EmailFileAttachment[] { attach }); 
     
        // Send the email
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });               
    
    }
}

 

 

I have set up chatter daily email digests in Salesforce.

 

I followed few records, and setup feed tracking fields. If any updates are made to that records, I am getting them in my daily email digest.  This is fine.  Every day I get emails of different records with the changes.

 

I have also followed few users in Salesforce.  But when these users make any updates/any changes to any records (which I am not following), I do not get those updates in the daily digest email.  When I follow a user, I expect all his updates to come to me in the daily digest email.  That's the whole point of following users. 

 

How do I set up this? I couldn't find any such setting.  Please help.

 

My webservice callout failed giving the following error.

 

Bad Request - Invalid Header

 

HTTP Error 400. The request has an invalid header name.

 

 

What does it mean by Invalid header?

 

 

Here's my code.  I have used similar code for my other webservices which works fine.  Not sure what is wrong here.  Can anyone please highlight?  Thanks.

 

String username='abc';
String password='abc';

tempuriOrg.BasicHttpBinding stub = new tempuriOrg.BasicHttpBinding();  
stub.timeout_x=120000;
stub.inputHttpHeaders_x = new Map<String, String>();        
Blob headerValue = Blob.valueOf(username + ':' + password);            
String authorizationHeader = 'Basic '+ EncodingUtil.base64Encode(headerValue);                
stub.inputHttpHeaders_x.put('Authorization', authorizationHeader);        
stub.inputHttpHeaders_x.put(username,password);
String response = stub.LoadSalesForceData('0000100005');                                                    

System.debug('NDS Response--------'+response);

 

 

Hi All,

 

I have created a vertical bar chart in visualforce page without any issues.  Now I would like to do the same with 'horizontal' orientation.

 

What changes do I need to make apart from changing the Orientation,xField,yField to make a vertical chart to horizontal one?

 

Below are the 2 codes and outputs.

VERTICAL

<apex:chart height="250" width="350" data="{!GenerateChart}"> 
            <apex:axis type="Numeric" position="left" fields="data" title="MT WON" />    
            <apex:axis type="Category" position="bottom" fields="name" title="Month"/>            
            <apex:barSeries orientation="vertical" axis="left" xField="name" yField="data" /> 
        </apex:chart>
        

HORIZONTAL
        <apex:chart height="250" width="350" data="{!GenerateChart}"> 
            <apex:axis type="Numeric" position="left" fields="data" title="MT WON" />    
            <apex:axis type="Category" position="bottom" fields="name" title="Month"/>            
            <apex:barSeries orientation="horizontal" axis="left" xField="data" yField="name" /> 
        </apex:chart>

 

 The horizontal one is weird! 

 

http://i44.tinypic.com/2rqj1o2.jpg

 

Let me know.  Thanks

Hi All

The 'Define Forecast Rollups and Default Date Ranges' unit is giving me the following error when I have done exactly what is asked in the challenge, hence an apparent error in the Trailhead checking process:
Challenge Not yet complete... here's what's wrong:
Couldn’t find default forecast display period 'Monthly', starting on '1 month ago', display '4 months'. Please double check the instructions.

Is there some apparently irrelevant setting I need that is not specified? It's not as if this is a complex unit!

Thanks
Keith
 
I have a text box and few checkboxes on the page. If the user enters,changes existing text,clciks or unclicks the checkbox and clicks the cancel button or navigates away from the page I want a pop-up message saying yor changes have not been saved
  • April 13, 2017
  • Like
  • 0
I have the formula field that based on the picklist selection it will populate the appropiate time. Using the picklist is limited and would like to use checkboxes so that way for each checbox checked it will calculate the time that way i.e checkbox 1 10min, checbox 2 60min = 70min. Hopefully this makes sense. Here is the formula field with picklist im working with.
 
Case( Stop_Complexity__c,
"Easy",15,
"Moderate",30,
"Difficult",90,
null)

 

Hi
I have built out a process builder flow that triggers when a task is created and meets criteria. 

User-added image


It will then follow to update a custom field Dials on related object Opportunities that is defaulted as "0" to increment +1 if criteria met.

I successfully get the field to increment from 0 to 1 however cannot seem to get it to fire for 1 to 2.  


User-added image


I cannot use formula Dials + 1, since it's pulling from the Task field.

Any ideas how I can get this cross object logic to increment from 1 to 2 and so forth?  

 

We are working on a donation page and the flow runs correctly within the flow, but not externally. It returns the following error:

Error element Search_Database_for_Email_Address (FlowRecordLookup).
This error occurred when the flow tried to look up records: ; nested exception is: common.exception.ApiQueryException: sObject type 'Contact' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. (There was a problem executing your command.). For details, see API Exceptions.

Any help or direction would be appreciated.

Thanks,
JohnR Llewellyn

--

Here is the full flow error alert:

Error element Search_Database_for_Email_Address (FlowRecordLookup).
This error occurred when the flow tried to look up records: ; nested exception is: common.exception.ApiQueryException: sObject type 'Contact' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. (There was a problem executing your command.). For details, see API Exceptions.

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.

Flow Details
Flow Name: ACS_Finn_Public_New_Donation
Type: Flow
Version: 10
Status: Active

Flow Interview Details
Interview Label: ACS - Finn Public New Donation 4/5/2017 4:19 PM
Current User: Give Site Guest User (005G0000004t1Wj)
Start time: 4/5/2017 4:18 PM
Duration: 70 seconds

How the Interview Started
Give Site Guest User (005G0000004t1Wj) started the flow interview.
Some of this flow's variables were set when the interview started.
CampaignCode = null

SCREEN: Make_a_Donation_to_ACS
Display Text: MakeAGift
Value at run time: Please select a gift amount:

Radio Buttons: Gift_Amount_RB
Label: Gift Amount
Data Type: Currency
Choices selected at runtime:
Choice selected at runtime: $25 (X25_Public_Nonprofit_Sector)
Value of choice: 25


Dropdown List: Credit_Card_Type
Label: Credit Card Type
Data Type: Text
Choices selected at runtime:
Choice selected at runtime: Visa (Visa)
Value of choice: Visa


Textbox: Credit_Card_Number_Masked
Label: Credit Card Number
Value at run time: 4111111111111111

Textbox: Credit_Card_Security_Code
Label: Credit Card Security Code
Value at run time: 111

Dropdown List: Expiration_Month
Label: Expiration Month
Data Type: Text
Choices selected at runtime:
Choice selected at runtime: 02 (X02)
Value of choice: 02


Dropdown List: Expiration_Year
Label: Expiration Year
Data Type: Text
Choices selected at runtime:
Choice selected at runtime: 2019 (X2019)
Value of choice: 2019


Display Text: IntroText8
Value at run time:

Checkbox: Would_you_like_to_make_this_a_recurring_monthly_gift
Label: Would you like to provide ACS with vital ongoing support and make this a recurring monthly gift?
Value at run time: false

Display Text: IntroText9
Value at run time:

Checkbox: anonymous
Label: Please make my gift anonymous.
Value at run time: false

Display Text: PersonalInfo
Value at run time:  
We need a few details from you in order to process your gift:

Textbox: First_Name1
Label: First Name
Value at run time: JohnR

Textbox: Last_Name1
Label: Last Name
Value at run time: Llewellyn

Textbox: Billing_Address_1
Label: Billing Address 1
Value at run time: 20101 Stalvey Hill Place

Textbox: Billing_Address_2
Label: Billing Address 2
Value at run time:

Textbox: Billing_City
Label: Billing City
Value at run time: Montgomery Village

Dropdown List: Billing_State_Choice
Label: Billing State
Data Type: Text
Choices selected at runtime:
Choice selected at runtime: Maryland (Maryland)
Value of choice: MD


Textbox: Zip_Code
Label: Zip Code
Value at run time: 20886

Textbox: Email_Address
Label: Email Address
Value at run time: jrl212@earthlink.net

Display Text: spacer
Value at run time:

Selected Navigation Button: NEXT

ASSIGNMENT: Assing_User_Inputs_to_Variables
{!varUserEmail} Equals {!Email_Address}
{!varUserFirstName} Equals {!First_Name1}
{!varUserLastName} Equals {!Last_Name1}
{!varGiftAmount} Equals null
{!varUserStreetAddress} Equals {!Billing_Address_1}
{!varUserStreetAddress2} Equals {!Billing_Address_2}
{!varUserCity} Equals {!Billing_City}
{!varUserState} Equals {!Billing_State_Choice}
{!varUserZip} Equals {!Zip_Code}
{!varshippingstreet} Equals {!Billing_Address_1}
{!varshippingstreet2} Equals {!Billing_Address_2}
{!varshippingcity} Equals {!Billing_City}
{!varshippingstate} Equals {!Billing_State_Choice}
{!varshippingzip} Equals {!Zip_Code}
{!varAnon} Equals {!anonymous}
{!varCCSecurityCode} Equals {!Credit_Card_Security_Code}
{!varCCExpirationMonth} Equals {!Expiration_Month}
{!varCCExpirationYear} Equals {!Expiration_Year}
{!varCreditCardNumberMasked} Equals cred
{!varCreditCardType} Equals {!Credit_Card_Type}
Result
{!varUserEmail} = "jrl212@earthlink.net"
{!varUserFirstName} = "JohnR"
{!varUserLastName} = "Llewellyn"
{!varGiftAmount} = "null"
{!varUserStreetAddress} = "20101 Stalvey Hill Place"
{!varUserStreetAddress2} = ""
{!varUserCity} = "Montgomery Village"
{!varUserState} = "MD"
{!varUserZip} = "20886"
{!varshippingstreet} = "20101 Stalvey Hill Place"
{!varshippingstreet2} = ""
{!varshippingcity} = "Montgomery Village"
{!varshippingstate} = "MD"
{!varshippingzip} = "20886"
{!varAnon} = "false"
{!varCCSecurityCode} = "111"
{!varCCExpirationMonth} = "02"
{!varCCExpirationYear} = "2019"
{!varCreditCardNumberMasked} = "cred"
{!varCreditCardType} = "Visa"

LUHNCLASS (APEX): Check_card_number
Inputs:
ccnumbers = {!Credit_Card_Number_Masked} (4111111111111111)
Outputs:
{!varluhntruefalse} () = output (true)

DECISION: Luhn_Check
Executed this outcome: Pass
Outcome conditions: and
1. {!varluhntruefalse} (true) Equals true
Logic: All conditions must be true (AND)

RECORD QUERY: Search_Database_for_Email_Address
Find one Contact record where:
Email Equals {!varUserEmail} (jrl212@earthlink.net)
Result
Failed to find record.

Error Occurred: ; nested exception is: common.exception.ApiQueryException: sObject type 'Contact' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. (There was a problem executing your command.)


Salesforce Error ID: 1144548263-25867 (2057743502)
 
Dear All,
I want to create a field "invoice number" which keep on increaing the value for each records but under certain criteria. Can you plz suggest how to realize it, Thanks,
I jst tried the formula field , But how to make the second parameter keep increaing to one for each new record created ?
 
IF( AND(Quote.ContractId !=Null,TEXT(Quote.Contract.Status)="Activated",Trans_Gross_premium__c!=0,Product2.Name="Voluntary"),"TI00500000",Null)

 
The steps in somewhere over the rainbow don't work.  
Note: You must create at least one new Communication record in order to complete this step.
Click  and select Communications.
Click New.
Give the record any name, and fill out all fields with values you choose. Click Save & New.
Create a few more records with different options. Be sure to select a different number each time.
Click and select Groups.
Select Life on Mars.
View the Chatter posts that the rover created.

I get the following error:
Challenge Not yet complete... here's what's wrong: 
Could not find a record in the Communications object. Ensure that you insert at least one record before attempting this challenge.

The 2nd module asks for an object called communication or plural communications.  I generated various records and nothing works including updating the group publisher layout to add records.  Please advise.
I have started using Salesforce in my new company but for now the use is very basic- feeding/pulling out customer database. I want to learn full-fledged Saelsfroce and excel in it, I am from non-developer/non-coding background. I have started learning the Salesforce Admin modules viaTrail Head.
It will be great if somebody can guide me since Salesforce is huge and I want to go step-by-step and learn each and every component of Salesforce applications. What could be the best way? What should I follow excatly?
Thank you
  • January 25, 2017
  • Like
  • 1
Please tell me if this will cause an issue:
  1. Using Force.com IDE delete a bad test class (associated with a trigger in step 2) by changing status to deleted in the XML file and deploy from Force.com IDE
    1. All Apex tests will run in Production and when they validate will delete the test class
  2. Using Force.com IDE deactivate/delete a bad trigger in Production by changing the status in the XML file to either inactive or deleted and deploy from Force.com IDE
    1. All Apex tests will run in Production and when they validate will inactivate/delete the trigger
My question is after deleting the Test Class in Step 1, when I try to deactivate my trigger will the Apex Tests try to "test my trigger" before deactivating it and won't be able to do so because of a missing test class.  I can't deactivate the trigger (Step 2) first, as it runs the bad test class and fails there. Please let me know.  Thank you!
 
 
 
Hi,

Kindly suggest the best practice to configure Authentication details (like username / password) inside Salesforce for REST call out using HttpRequest class.

User-added image

Hi

 

Is it possible to stop a user from updating/deleting a record when a certain checkbox is true?

For example i have field approved. if the field is false, user can edit that record but if its true they cant?

Probably have to use a trigger and see if approved field is false then allow update and true not but i cant put it in code?

 

thanks

Uves

Hi,

 

is there a way to authenticate an application for using the salesforce rest api with just the normal username / password credentials from

the basic http authentication?

I know thats not safe but its just for testing the functionality of my application.

 

best regards

Elmar

  • June 27, 2012
  • Like
  • 0

Hello, I spend a lot of time in search how to use the rest api, but only i find information to use the rest api with oAuth, but in dont want to use oauth, i want to type the username and password in the code and this is all, i want to make an app where the client dont see any rest api comunication, I mean execute the apex code in background.

 

I find a code in http://208.69.57.141/index.php/2011/05/using-the-salesforce-rest-api-with-javascript-and-jquery-in-visualforce-pages-using-apex/#comments

 

 

But show me a error [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 

Thanks

  • September 08, 2011
  • Like
  • 0

Hi all, Any hints on how to get person accounts made available?

 

From the documentation I've read it looks like I need to request it from SF directly, but for the life of me I can't seem to locate a method to make that request.

 

Thanks

-M

Hi,

 

I want to lock particular Record on some condition.

 

Ex: I will include one custom field(check box) in Opportunity as "Lock". If this is checked for any Opportunity, then that Opportunity should not be accessible by any other group (Ex: Sales, Marketing).

How can I achieve this?

 

Thanks for any help.....

 

 

Hi,
 
Yesterday I had deployed aan apex trigger from sandbox to production env. The trigger is an "before insert, before update" to check for duplicate account names. The trigger works fine in prodiuction for preventing duplicate Account names.
 
But today when I tried to mass update Accounts for some other field using Apex Data Loader, I get the following error:
 

Apex script unhandled trigger exception by user/organization: 00530000000nHi3/00D300000006QZD

Trg_Account_Name_Dedup: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.Trg_Account_Name_Dedup: line 1, column 143

Can anyone please advise on how to disable triggers in production env so that I can carry out other mass updates in Account using Apex Data loader tool.

Thanks and regards,
Ambili

  • February 12, 2008
  • Like
  • 0
Maybe I'm missing the obvious here, but I can't figure out how to deactivate a trigger in a production environment. I created a simple trigger in the sandbox, tested and deployed it to production. Everything works fine and the trigger works as expected in production. However now I would like to deactivate and/or undeploy it from production. In the sandbox I can edit the trigger and uncheck the IsActive field, but I can't edit the trigger in production (I am the system administrator) because there is no Edit link.

I tried deactivating in the sandbox and then redeploying to production, but that didn't work either. Do I need to write a deployment script, access the metadata, use Ant? Without the ability to roll back triggers from production, I can't use Apex. What am I missing? I searched all the documentation and this forum and didn't find anything other than references to the UI checkbox, which doesn't exist in production.

Mark

Message Edited by MarkL on 02-21-2008 09:48 AM
I have started using Salesforce in my new company but for now the use is very basic- feeding/pulling out customer database. I want to learn full-fledged Saelsfroce and excel in it, I am from non-developer/non-coding background. I have started learning the Salesforce Admin modules viaTrail Head.
It will be great if somebody can guide me since Salesforce is huge and I want to go step-by-step and learn each and every component of Salesforce applications. What could be the best way? What should I follow excatly?
Thank you
  • January 25, 2017
  • Like
  • 1