• William Tran
  • ALL STAR
  • 6435 Points
  • Member since 2015
  • Solution Architect
  • TranConsulting Inc (william@tranconsultinginc.com)

  • Chatter
    Feed
  • 166
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 0
    Questions
  • 912
    Replies
Hi

How to get the value for an field from the keySet().
I don't want the value for all fields but  value for some fields in the object.
And I have to store the selected key and value to another map
Provided the limitation that 'Export Reports' option is not availbale with Lightning, can i open only the Reports tab in a salesforce classic view and all others in the lightning UI? I would basically like to know if i could use a combination on both?
I am referring to the page 214 on apex dev guide and confused with the table as such , am okay with first and second column of it ,but did not get what below meant ? can someone pls explain me 
  • Can update original object using an update DML operation
  • Can delete original object using a delete DML operation
I have field called adjuster history with record 'rocky-1,james-2,John-3'  for getting first string record  used formula as"LEFT(Cust_field__c, FIND("-", Cust_field__c)-1)" but if i removed rocky from database then adjuster history is like ',james-2,John-3' and i get result as ",James-2 " how do i remove unwanted comma from the result.??????
 
Most of the limits I am aware of are around number of workflows on an object, number of field updates per workflow, etc.

if I have a workflow rule fire 3-4 updates every time the record is edited (no time based workflows) and an integration job updates 1M rows of data will Salesforce have any issue with processing 3-4 million field updates as a result? Woukd I expect any time delays?
Hi experts,

I would like to get all fields API names on specific page layout and use the fields in SOQL. Then I want to display the query results on Visualforce page.

I asked Salesforce Support for help but they cannot answer this question so I searched on Discussion Forums and found some articles about DescribeLayoutResult.
https://developer.salesforce.com/forums/?id=906F0000000AG13IAG

I read links for references but I'm just confused and not sure what to do.

Does anyone provide me simple but complete code to display field details on Visualforce page so that I can amend it for my use.
It would be nice if you can use Lead object and Name field.

Thank you in advance.


 
The objective of this formula is to calculate the number of days to apply a rebate to based on the billing Period Start Date & Period End Date.

Need help fixing the formula - I am using a text formula field and get error message: - [Syntax error. Extra ',' (Related field: Formula)]  , I am lost on where this extra "," is.  I get a similar error message if I chage formula field type to number formula field.
 
Period_Start_Date__c and Period_End_Date__c. are date format fields 
I am trying to get the formula to check if the period is in Q1 of a leap year so the added day is considered in the final calculation if both criteria are true.
 

text(If(And
 (OR(MOD( YEAR(Period_Start_Date__c), 400 ) = 0, 
  AND(MOD( YEAR(Period_Start_Date__c), 4 ) = 0,
    MOD( YEAR(Period_Start_Date__c), 100 ) != 0)
   ),
      CEILING( MONTH (Period_Start_Date__c) / 3  =  1)),
 
(Period_End_Date__c  - Period_Start_Date__c) + 1)),(Period_End_Date__c  - Period_Start_Date__c ))
Hi, 
I'm trying to see the total revenue of a revenue report on the mobile app, but all I can see are the 2000 rows of data. Is there any way I can create a report page that shows the total revenue of the report. 
In other words, is there any way to create a custom report view with custom fields? 

Thanks!
Alex
Context: We have a custom object called Projects, which sinks to a system called Harvest. The projects have a child object called Time Entries, which stores start time, end time, and duration. Every night, Harvest syncs to these objects and adds new time entires. Every time entry lives on a parent Project. There are two Projects per client account, one for Client Relations, and the other for Development.

What I want: I want a roll up summary field on the Account object that sums the total Dev and CR time from the sum of time entries in the past twelve months. Unfortunately, it is my understanding that you cannot use the Today() formula on rollup summary objects.

I'm new to SFDC development but have been an admin for four years. My theoretical appraoch would be to have a trigger that runs every night on the Time Entries object and says is the date of the entry in the last 12 months, if so, check yes, if not, check no. Because the TODAY() formula will be running in the back end, I can then use that check box to create rollup summary fields and don't need to over complicate it. 

Problem: I've never written code. 

Any help here would be really really appreciated. We have a full sandbox, but no development resources currently, so I'm just trying to get started. 
I realise this question has been asked a few times already but couldn't find any suggested solution that worked for me, so here goes.....

I am currently trying to complete the 'Using Expressions' challenge on the Trailhead Lightning site, and keep getting the same error.

Code
 Component
<aura:component >
    <aura:attribute name="IsSunday" type="Boolean" default="false"/>
    <aura:attribute name="IsMonday" type="Boolean" default="false"/>
    <aura:attribute name="IsTuesday" type="Boolean" default="false"/>
    <aura:attribute name="IsWednesday" type="Boolean" default="false"/>
    <aura:attribute name="IsThursday" type="Boolean" default="false"/>
    <aura:attribute name="IsFriday" type="Boolean" default="false"/>
    <aura:attribute name="IsSaturday" type="Boolean" default="false"/>
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:if isTrue="{!v.IsSunday}">
    <p>Today is Sunday</p>
   </aura:if>
   <aura:if isTrue="{!v.IsMonday}">
    <p>Today is Monday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsTuesday}">
    <p>Today is Tuesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsWednesday}">
    <p>Today is Wednesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsThursday}">
    <p>Today is Thursday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsFriday}">
    <p>Today is Friday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsSaturday}">
    <p>Today is Saturday</p>
    </aura:if>
</aura:component>

CONTROLLER
({
    doInit : function(component) {
        var theDate = new Date();
        if (theDate.getDay()==0) {component.set("v.IsSunday", true);}
        if (theDate.getDay()==1) {component.set("v.IsMonday", true);}
        if (theDate.getDay()==2) {component.set("v.IsTuesday", true);}
        if (theDate.getDay()==3) {component.set("v.IsWednesday", true);}
        if (theDate.getDay()==4) {component.set("v.IsThursday", true);}
        if (theDate.getDay()==5) {component.set("v.IsFriday", true);}
        if (theDate.getDay()==6) {component.set("v.IsSaturday", true);}
    }
})

ERROR
Challenge not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: ZPWCUPZG

I tried creating a new Developer edition, as per a suggestion on another thread, but got the same error (albeit with a different error id).

I went back to my original developer edition and tried another suggestion - modifying the code in my component to have only one <aura:if> statement and one <aura:set attribute....> tag, as shown below:

<aura:component >
    <aura:attribute name="IsSunday" type="Boolean" default="false"/>
    <aura:attribute name="IsMonday" type="Boolean" default="false"/>
    <aura:attribute name="IsTuesday" type="Boolean" default="false"/>
    <aura:attribute name="IsWednesday" type="Boolean" default="false"/>
    <aura:attribute name="IsThursday" type="Boolean" default="false"/>
    <aura:attribute name="IsFriday" type="Boolean" default="false"/>
    <aura:attribute name="IsSaturday" type="Boolean" default="false"/>
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:if isTrue="{!v.IsSunday}">
    <p>Today is Sunday</p>
        <aura:set attribute="else">
                Today is not Sunday
        </aura:set>
    </aura:if>

<!-- Commented out code -->
    <!-- <aura:if isTrue="{!v.IsMonday}">
    <p>Today is Monday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsTuesday}">
    <p>Today is Tuesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsWednesday}">
    <p>Today is Wednesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsThursday}">
    <p>Today is Thursday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsFriday}">
    <p>Today is Friday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsSaturday}">
    <p>Today is Saturday</p>
    </aura:if> -->
<!-- Commented out code -->

</aura:component>

Same end result:
Challenge not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: MEEOAPTN

Any help would be appreciated. have spent quite a lot of time on this already!
Having a challenging day with all of my Trailhead exercises today, All 3 have not gone well, I guess this is a learning experience

Ok, here is the error I'm receiving for his challenge. 
Challenge not yet complete... here's what's wrong: 
A Visualforce page named 'FlowPage' was not found.

I will add the screenshots below:
1. New Customer Flow
New Customer Flow
2. FlowScreen
2. FlowScreen

3. Account Creation
Account Creation
3. Contact Creation

4. Contact Creation
Opportunity Creation

4. Opportunity


I will add the screenshots for the Visual Force Pages on part II of this