• ArmanM
  • NEWBIE
  • 140 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 36
    Questions
  • 37
    Replies
Hi,

I have a class that gets child objects information in a master-detail relationship objects. This is used to query information for the parent object. I am having some trouble writing a test for this class. 
public with sharing class deliverableInfo {
    public List<Media_Deliverable__c > childLs{get;set;}
    public List<Marketing_Deliverables__c > childLs2{get;set;}
    
    public deliverableInfo(ApexPages.StandardController controller) {
        
        childLs= new List<Media_Deliverable__c >();
        childLs2 = new List<Marketing_Deliverables__c >();
        
        id parId = ApexPages.currentPage().getParameters().get('id');

        childLs = [select id, CurrencyIsoCode, Deliverable_Name__c, Product__c, Product_copy__c, 
                  Quantity__c, Rate__c, True_Total_Value__c, Value__c, Value_Add__c,
                  Value_add_price__c from Media_Deliverable__c where Media_Plan__c = :parId ];
        
        childLs2 = [select id, CurrencyIsoCode, Additional_Comments__c, Comments_by_Mkt__c,
                   Comments_by_OG__c, Deliverable_Name__c, Deliverables__c, Media_Plan__c, Product_copy__c, 
                   Product_Description__c, Quantity__c, Rate__c, Values__c, Value_Add__c, Value_add_price__c 
                   from Marketing_Deliverables__c where Media_Plan__c = :parId ];
    }
}
Thanks, 
Arman
 
  • December 21, 2016
  • Like
  • 0
Hi, 

I have created a controller that would query some information from a custom child object so I can use it from its parent object. These two objects have a master-detail relationship.  

Parent/master object: Media_Plan__c
Child/detailed object: Media_Deliverable__c

I need to have a visualforce page that renders as PDF in Media_Plan__c layout. This page would get triggered with a button on the layout, this pdf page would get some information from Media_Plan__c and from its child object Media_Deliverable__c. I need some help with this page, how can I apply my controller to achieve this? I was thinking of using apex:repeat, but not sure how to apply this.   

The following is my controller -
 
public with sharing class Abc {
    public List<Media_Deliverable__c > childLs{get;set;}
    
    public Abc(ApexPages.StandardController controller) {
        
      	childLs= new List<Media_Deliverable__c >();
        id parId = ApexPages.currentPage().getParameters().get('id');

      	childLs = [select id, Deliverable_Name__c, Product__c, Product_copy__c, 
		Quantity__c, Rate__c, True_Total_Value__c, Value__c, Value_Add__c,
		Value_add_price__c from Media_Deliverable__c where Media_Plan__c = :parId ];
    }
}
  • December 20, 2016
  • Like
  • 0
Hi,

I am making a custom object that has a generate plan(pdf) button. This object has a related list called where Deliverables__c exist. Deliverables__c is a child object in master detailed relationship to the parent object; Plan__c.

Master Object: Plan__c
Detailed/child object: Deliverables__c
 
For the PDF button I need it to have a similar functionality to Quote object, where each line item of Deliverables__c will be displayed in the PDF. Basically I would need to get information from its related list items from Deliverable__c into this PDF in Plan__c object. How can I do this?
  
Thanks,
Arman 
  • December 19, 2016
  • Like
  • 0
H,

I have a object called Media_Deliverable__c that has master detail relationship with Media_Plan__c.

In Media_Plan__c I have a button that renders as PDF. I need to get information from its related list items from Media_Deliverable into this PDF as well. How can I do this?

Thanks,
Arman 
  • December 19, 2016
  • Like
  • 0
Hi, 

This is a two-part question, here's some context. I have three custom objects:
First custom object - Plan__c (master-detailed) related to Opportunity
Second custom object - Product_Plan_A__c (master-detailed) related to Plan__c 
Third custom object - Product_Plan_B__c (master-detailed) related to Plan__c

Now I can't seem to figure out why and how to -  
Q1) Standard CurrencyIsoCode field are not visible in these custom objects. Users will be filling out currency value fields so I need them to see what currency these values will be. 
Q2) The Standard CurrencyIsoCode should be same as Opportunity's CurrencyIsoCode for Plan__c. Thereby Product_Plan_A__c & Product_Plan_B__c should be the same as Plan__c's CurrencyIsoCode.

How can I do this? 

Thank You, 
Arman 
  • November 30, 2016
  • Like
  • 0
Hi,
 
I have custom field 'Request Date' and custom button called 'Send Request' that redirects to send an email template. I need to stamp today's date into the custom field when the button is clicked and the email has been sent. 
 
Is there any way of doing this? How?
 
Thanks,
Arman
  • November 21, 2016
  • Like
  • 0
Hi, 

I need to pass a value to an external system (Tableau). The value I need to pass is a currency formula in opportunities. I was thinking of applying a workflow where I just have a blank currency field in the background that would get updated when the calculated currency formula field is not NULL. 

I am trying to do this with field updates but I am not quiet sure how this rule can update all pervious values as well. Is this the right approach for something like this? How can I achieve this?  

Reason for this update: salesforce connector does not support extracting calculated fields.

Thanks 

Arman
  • November 14, 2016
  • Like
  • 0
​I have a class that uses email template with Visualforce, this would be used to send emails on opportunity. I have completed this class but I am having trouble writing a test that would pass (>75%). I am using this as reference: 

https://help.salesforce.com/apex/HTViewSolution?id=000181102&language=en_US

This is my apex class: 
public class emailHelper {
    // In a separate class so that it can be used elsewhere
	public Opportunity opp {get;set;}    
	public User myUser { get;set;}

    public emailHelper(ApexPages.StandardController stdController)
    { 
        opp = (opportunity)stdController.getRecord(); 
    }

User currentUser = [Select email from User where username = :UserInfo.getUserName() limit 1];  

    public  PageReference sendEmail() {
    	PageReference emailPage = new PageReference('/email/author/emailauthor.jsp');
        Map<String, String> params = emailPage.getParameters();
            params.put('p3_lkid',opp.ID); //email will be attached to the activity history of the opportunity where the button was clicked using the acct.ID
            params.put('template_id','00X28000000MfO6'); /// template ID of the email template to be shown goes here
            params.put('rtype','003');
            params.put('p24', opp.CS_Resource__c); //Opportunity.CS_Resource__c showing in "Additional to" field
            params.put('p4', opp.Owner.Email);	//cc the opportunity owner
            params.put('p5','email@email.com'); //email address showing in Bcc field
            params.put('new_template','1'); 
            params.put('retURL',ApexPages.currentPage().getUrl()); //after send button is clicked, go back to the opportunity where the button was clicked
             
    return emailPage;
      
    }  
}
Thank you,
Arman
 
  • November 08, 2016
  • Like
  • 0
Hi, 

We have a new user that is experiencing an issue that no one in their same team is facing. We have a custom object which has a button that redirects to send an email window. This issue pops up when this user clicks this custom button, no other user in the same profile/role is facing this problem. Why is this happening ? How can we fix this ? 

Error msg: 'This page isn't available in Salesforce Lightning Experience or Salesforce1.'

However other standard users can click that button and works perfectly for them in lightning. 

Thank you, 
  • November 02, 2016
  • Like
  • 0
Hi, 

I need a custom discount percentage field that would be dependent on a custom picklist field. This picklist field is named "value full" with two options: 'yes' and 'no'. I want the discount field to be auto update to 100% if and when value full is yes otherwise don't update anything leave it blank for the user to fill in. 

How can I do this? 

Thanks, 
Arman
  • October 25, 2016
  • Like
  • 0
Hi, 

We currently have a workflow email in place and it gets triggered where when someone changes the opportunity stage to (closed won or closed won annual) and opportunity department is (sales). However I want this workflow to get triggered only when if the opportunity owner changes/marks it as (closed won or closed won annual) and opportunity department is (sales). How can I do this? 

Thank you,
AcctMgt 
  
  • October 20, 2016
  • Like
  • 0
Hi, 

I am trying to create a custom picklist on a custom object, this picklist will hold three names (Person A, Person B, and Person C). This field will only show or only be editable if the creator of the record equals User 1.

How can go about creating this?

Thanks !  
  • October 17, 2016
  • Like
  • 0
Hi, 

I need to implement a new way to capture some info for opportunities. Here are some details on how this process should work -

1) I want to capture plans for product, call it Product Plan
     a. These plans need to be connected to a opportunity
     b. Each Product Plan was two types of plans (Regular & Promotional)
     c. User can fill out either/or(AND/OR) plan types
     d. More than 10 product the plans can be generated for (Product A, B, C.. etc) 
     e. User can pick one or more product for a plan   
2) Fields for input for the plans include
    a. Name
    b. Quantity 
    c. Rate 
    d. Value (b*c)
    e. comments
    d. start and end date (Comes from the opportunity)

What I was thinking is that If I had some way to start a process where the user will start by picking:
1) What is the plan type - (Regular, Promotional, or both)
2) Then, what are the products (Multiple picklist) - (Product A, B, C .. etc)
3) User will be filling out plan information(fields) about the products 
  
Note - Will need to be in such way that users can go back, edit and/or add new plans

I'm really confused how to go about this, how can I have this type of process in our Salesforce system. 

Thanks, 
Arman 
  • October 14, 2016
  • Like
  • 0
Hi,

I am trying to add timestamp to a formula field that was a Date type field before but now I am trying to switch this to a Date/Time field. However I am getting an error after changing the formula type from Date to Date/Time. 

Field Name - Completed Date
Error that I am getting - "Formula result is data type (Date), incompatible with expected data type (Date/Time). (Related field: Formula)"
Formula I am using - "IF(ISPICKVAL( Data_Status__c,"Completed" ),TODAY(), NULL)"

I tried replacing Today() function with Now() but thats giving a dynamic timestamp not the time according to the formula which says if the status is changed to 'Completed', add the date and time. 

Why am getting this error ? And How can I add timestamp to this formula field using Date/Time type.

Thanks
  • September 22, 2016
  • Like
  • 0
Hi, 

I want to restrict a date field and a currency field from being edited. The description for this rule should be that -
If(
a) 20th of the current month

b) Close date is within next month.)
//When above condition is true apply the following rule
-> Lock 'Close Date' and 'Amount' 

 
For example if todays date was September 20th and I had a opportunity where its Close date is in October. The close date and amount should be locked. 

How can I get this rule to apply to opportunities? 

Thank you,

 
  • September 16, 2016
  • Like
  • 0
Hi, 

I want to restrict so that people can not delete anyone else opportunity. Only the owner and admin's would be allowed to delete the opportunity.
How can I do this ? 

Thanks,
  • September 16, 2016
  • Like
  • 0
Hi, 

I made a VF page to display a dashboard on the home page. This is not working because it is not displaying anything. How can fix this ?

<apex:page>
<apex:iframe src="https://salesforce.com/one/one.app#/sObject/01Z28000000f9GOEAY/view?t=1471618962936" height="100" frameborder="false"/>
</apex:page>

Thanks
  • August 19, 2016
  • Like
  • 0
Hi, 

I need to replace our org's homepage with a dashboard that is already created. How can I do this in Lightning Experience UI.

I was looking at the following -  https://developer.salesforce.com/forums/?id=906F000000098mcIAA 
However I don't think the following HTML custom component hack will not work in Lightning Experience.


<iframe src="<full path to your page>"></iframe>

Thank You,
AR

 
  • August 17, 2016
  • Like
  • 0
Hi,

I need to change our homepage that all our users sees after they login. I know you can change the Default Landing Tab to any other object associated tab, but in our situation I need the homepage to land on a particular dashboard that I made.

Is there any way I can do this? If so How?  

Thank You,
Saavn 
  • August 16, 2016
  • Like
  • 0
Hi, 

I am rendering a pdf with VF page, but I'm having a little trouble with alignment. Please see the below code and screenshot.
User-added image
As you can see, the headings for Mobile, Web Spots and Subtotal & total is a little bit off. So basically I want the headings to be aligned to the left of the page, the dotted lines to be centered and currency code + amount to be aligned to the right of the page. 

Here is that part of my code, please help out - 
<style>
            
                @page {
                     @top-center {
                                 content: element(header);
                }
                                 }
                                 @top-center {
                                 content: element(header1);
                }
                     @bottom-left {
                                 content: element(footer);
                                  }
                      }
                            
                div.header1 {
                }
                
                div.header {
                    border-bottom-style: solid;
                    border-bottom-width: thick;
                    border-bottom-color: #30b55a;
                }
                
                div.header h1 {
                    font-size: 12pt;
                    margin-bottom: 2px;
                }
                
                div.footer {
                                display: block;
                             padding: 5px;
                               position: running(footer);
                      }
                                     .pagenumber:before {
                                        content: counter(page);
                       }
                                   .pagecount:before {
                             content: counter(pages);
                        }
                
                table, table tr, table tr td {
                    border: none;
                    border-collapse: collapse;
                }
                
                table tr td {
                    padding: 2px;
                }
                
                .desc1 {
                    color: #808080;
                    border-right-style: solid;
                    border-right-width: thin;
                    border-right-color: #30b55a;
                    padding-right: 28px;
                }
                
                .desc {
                    color: #808080;
                    border-right-style: solid;
                    border-right-width: thin;
                    border-right-color: #30b55a;
                    padding-right: 20px;
                }
                
                .desc2 {
                    color: #808080;
                    border-right-style: solid;
                    border-right-width: thin;
                    border-right-color: #30b55a;
                    padding-right: 10px;
                }
                
                .desc3 {
                    color: #808080;
                    border-right-style: solid;
                    border-right-width: thin;
                    border-right-color: #30b55a;
                    padding-right: 70px;
                }
                
                .value {
                    padding-left: 10px;
                }
                
                .value2 {
                    padding-left: 10px;
                    text-align: right;
                }
                
            </style>
.....
...

<apex:outputPanel layout="none" rendered="{!NOT(ISBLANK(Opportunity.Mobile_Spots_B__c))}">
                           
                            <div class="header" align="right">
                            
                            <h1>Mobile Spots -&nbsp; 
                            <apex:outputText style="font-size: 10pt" value="{0,number, }">
                            <apex:param value="{!Opportunity.Mobile_Spots_B__c}"/>
                            </apex:outputText>
                                                        
                            <apex:outputText style="font-size: 10pt" value=" @ {!Opportunity.CurrencyIsoCode} {0,number, 0.00}">
                            <apex:param value="{!Opportunity.Mobile_Spot_Rate__c}"/>
                            </apex:outputText>
                            
                            &nbsp;&nbsp;&nbsp;
                            
                            <apex:outputText style="font-size: 10pt" value=" ---------------------------------------------------------------------------------
                            {!Opportunity.CurrencyIsoCode} {0,number, }">
                            <apex:param value="{!Opportunity.Mobile_Revenue__c}"/>
                            </apex:outputText>
                            </h1>
                            </div>
                   <table>
                    <tr>
                        <td style="font-size: 10pt" class="desc">Audio Ads</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText style="font-size: 10pt" value="{0,number, }">
                                <apex:param value="{!Opportunity.Mobile_Spots_B__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc">Companion Banner</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText style="font-size: 10pt" value="{0,number, }">
                                <apex:param value="{!Opportunity.Mobile_Companion_Banner__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc">Display Impression</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText style="font-size: 10pt" value="{0,number, }">
                                <apex:param value="{!Opportunity.Mobile_Display_Impression__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc">Interstitial</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText style="font-size: 10pt" value="{0,number, }">
                                <apex:param value="{!Opportunity.Moblie_Interstitial__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                </table> 
            </apex:outputPanel>
            
            
            <apex:outputPanel layout="none" rendered="{!NOT(ISBLANK(Opportunity.Web_Spots_B__c))}">
                          
                            <div class="header" align="right">
                            <h1>Web Spots -&nbsp;
                            <apex:outputText style="font-size: 10pt" value="{0,number, }">
                            <apex:param value="{!Opportunity.Web_Spots_B__c}"/>
                            </apex:outputText> 
                            
                            <apex:outputText style="font-size: 10pt" value=" @ {!Opportunity.CurrencyIsoCode} {0,number, 0.00}">
                            <apex:param value="{!Opportunity.Web_Spot_Rate__c}"/>
                            </apex:outputText>
                            
                            &nbsp;&nbsp;&nbsp;
                            
                            <apex:outputText style="font-size: 10pt" value=" ------------------------------------------------------------------------------------------ 
                            {!Opportunity.CurrencyIsoCode} {0,number,}">
                            <apex:param value="{!Opportunity.Web_Revenue__c}"/>
                            </apex:outputText>
                            </h1></div>
                   <table>
                    <tr>
                        <td style="font-size: 10pt" class="desc">Audio Ads</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText value="{0,number, }">
                                <apex:param value="{!Opportunity.Web_Spots_B__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc">Companion Banner</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText value="{0,number, }">
                                <apex:param value="{!Opportunity.Web_Spots_B__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc">Display Impression</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText value="{0,number, }">
                                <apex:param value="{!Opportunity.Web_Display_Impression__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc">Interstitial</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:outputText value="{0,number, }">
                                <apex:param value="{!Opportunity.Web_Interstitial__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                </table> 
            </apex:outputPanel>
            
             <apex:outputPanel >
                            <div class="header" align="right">
                            <h1>Subtotal &nbsp;&nbsp;
                           
                            <apex:outputText style="font-size: 10pt" value=" ------------------------------------------------------------------------------------------------------------------------- 
                            {!Opportunity.CurrencyIsoCode} {0,number,}">
                            <apex:param value="{!Opportunity.RO_Value__c}"/>
                            </apex:outputText>
                            </h1></div>
                   <table>
                   
                   <tr>
                        <td style="font-size: 10pt" class="desc3">Discounts</td>
                        <td style="font-size: 10pt" class="value">
                            <apex:OutputText value="Marketing Campaign" > </apex:OutputText>
                        </td>
                        
                        <td style="font-size: 10pt">
                            <apex:outputText value="- {0,number,}">
                                <apex:param value="{!Opportunity.RO_Value__c}"/>
                            </apex:outputText>
                        </td>
                    </tr>
                  </table>
            </apex:outputPanel>
                <br></br> 
            <apex:outputPanel >
                <div class="header" align="right">
                        <h1>Total &nbsp;&nbsp; 
                            <apex:outputText style="font-size: 10pt" value=" --------------------------------------------------------------------------------------------------------------------------------- 
                                {!Opportunity.CurrencyIsoCode} 0.00">
                            </apex:outputText>
                            </h1></div>
                     <table>        
                     <tr>
                       <td style="font-size: 10pt" class="desc2">Spots</td> 
                           <td style="font-size: 10pt" class="value2"> 
                               <apex:outputText value="{0,number, }">
                                   <apex:param value="{!Opportunity.Total_Spot_Booked__c}"/>
                               </apex:outputText>
                           </td>  
                    </tr>   
                    
                    <tr>
                        <td style="font-size: 10pt" class="desc2">Approx. Impressions</td>
                        <td style="font-size: 10pt" class="value2">
                            <apex:OutputText style="font-size: 10pt" value="{0, number, }">
                                <apex:param value="{!Opportunity.Total_Impressions__c}"/> 
                            </apex:OutputText>
                        </td>
                    </tr>
                </table>

 
  • August 11, 2016
  • Like
  • 0
Hi,

I have a class that gets child objects information in a master-detail relationship objects. This is used to query information for the parent object. I am having some trouble writing a test for this class. 
public with sharing class deliverableInfo {
    public List<Media_Deliverable__c > childLs{get;set;}
    public List<Marketing_Deliverables__c > childLs2{get;set;}
    
    public deliverableInfo(ApexPages.StandardController controller) {
        
        childLs= new List<Media_Deliverable__c >();
        childLs2 = new List<Marketing_Deliverables__c >();
        
        id parId = ApexPages.currentPage().getParameters().get('id');

        childLs = [select id, CurrencyIsoCode, Deliverable_Name__c, Product__c, Product_copy__c, 
                  Quantity__c, Rate__c, True_Total_Value__c, Value__c, Value_Add__c,
                  Value_add_price__c from Media_Deliverable__c where Media_Plan__c = :parId ];
        
        childLs2 = [select id, CurrencyIsoCode, Additional_Comments__c, Comments_by_Mkt__c,
                   Comments_by_OG__c, Deliverable_Name__c, Deliverables__c, Media_Plan__c, Product_copy__c, 
                   Product_Description__c, Quantity__c, Rate__c, Values__c, Value_Add__c, Value_add_price__c 
                   from Marketing_Deliverables__c where Media_Plan__c = :parId ];
    }
}
Thanks, 
Arman
 
  • December 21, 2016
  • Like
  • 0
Hi,

I am making a custom object that has a generate plan(pdf) button. This object has a related list called where Deliverables__c exist. Deliverables__c is a child object in master detailed relationship to the parent object; Plan__c.

Master Object: Plan__c
Detailed/child object: Deliverables__c
 
For the PDF button I need it to have a similar functionality to Quote object, where each line item of Deliverables__c will be displayed in the PDF. Basically I would need to get information from its related list items from Deliverable__c into this PDF in Plan__c object. How can I do this?
  
Thanks,
Arman 
  • December 19, 2016
  • Like
  • 0
H,

I have a object called Media_Deliverable__c that has master detail relationship with Media_Plan__c.

In Media_Plan__c I have a button that renders as PDF. I need to get information from its related list items from Media_Deliverable into this PDF as well. How can I do this?

Thanks,
Arman 
  • December 19, 2016
  • Like
  • 0
Hi, 

This is a two-part question, here's some context. I have three custom objects:
First custom object - Plan__c (master-detailed) related to Opportunity
Second custom object - Product_Plan_A__c (master-detailed) related to Plan__c 
Third custom object - Product_Plan_B__c (master-detailed) related to Plan__c

Now I can't seem to figure out why and how to -  
Q1) Standard CurrencyIsoCode field are not visible in these custom objects. Users will be filling out currency value fields so I need them to see what currency these values will be. 
Q2) The Standard CurrencyIsoCode should be same as Opportunity's CurrencyIsoCode for Plan__c. Thereby Product_Plan_A__c & Product_Plan_B__c should be the same as Plan__c's CurrencyIsoCode.

How can I do this? 

Thank You, 
Arman 
  • November 30, 2016
  • Like
  • 0
Hi,
 
I have custom field 'Request Date' and custom button called 'Send Request' that redirects to send an email template. I need to stamp today's date into the custom field when the button is clicked and the email has been sent. 
 
Is there any way of doing this? How?
 
Thanks,
Arman
  • November 21, 2016
  • Like
  • 0
​I have a class that uses email template with Visualforce, this would be used to send emails on opportunity. I have completed this class but I am having trouble writing a test that would pass (>75%). I am using this as reference: 

https://help.salesforce.com/apex/HTViewSolution?id=000181102&language=en_US

This is my apex class: 
public class emailHelper {
    // In a separate class so that it can be used elsewhere
	public Opportunity opp {get;set;}    
	public User myUser { get;set;}

    public emailHelper(ApexPages.StandardController stdController)
    { 
        opp = (opportunity)stdController.getRecord(); 
    }

User currentUser = [Select email from User where username = :UserInfo.getUserName() limit 1];  

    public  PageReference sendEmail() {
    	PageReference emailPage = new PageReference('/email/author/emailauthor.jsp');
        Map<String, String> params = emailPage.getParameters();
            params.put('p3_lkid',opp.ID); //email will be attached to the activity history of the opportunity where the button was clicked using the acct.ID
            params.put('template_id','00X28000000MfO6'); /// template ID of the email template to be shown goes here
            params.put('rtype','003');
            params.put('p24', opp.CS_Resource__c); //Opportunity.CS_Resource__c showing in "Additional to" field
            params.put('p4', opp.Owner.Email);	//cc the opportunity owner
            params.put('p5','email@email.com'); //email address showing in Bcc field
            params.put('new_template','1'); 
            params.put('retURL',ApexPages.currentPage().getUrl()); //after send button is clicked, go back to the opportunity where the button was clicked
             
    return emailPage;
      
    }  
}
Thank you,
Arman
 
  • November 08, 2016
  • Like
  • 0
Hi, 

I am trying to create a custom picklist on a custom object, this picklist will hold three names (Person A, Person B, and Person C). This field will only show or only be editable if the creator of the record equals User 1.

How can go about creating this?

Thanks !  
  • October 17, 2016
  • Like
  • 0
Hi,

I am trying to add timestamp to a formula field that was a Date type field before but now I am trying to switch this to a Date/Time field. However I am getting an error after changing the formula type from Date to Date/Time. 

Field Name - Completed Date
Error that I am getting - "Formula result is data type (Date), incompatible with expected data type (Date/Time). (Related field: Formula)"
Formula I am using - "IF(ISPICKVAL( Data_Status__c,"Completed" ),TODAY(), NULL)"

I tried replacing Today() function with Now() but thats giving a dynamic timestamp not the time according to the formula which says if the status is changed to 'Completed', add the date and time. 

Why am getting this error ? And How can I add timestamp to this formula field using Date/Time type.

Thanks
  • September 22, 2016
  • Like
  • 0
Hi, 

I want to restrict a date field and a currency field from being edited. The description for this rule should be that -
If(
a) 20th of the current month

b) Close date is within next month.)
//When above condition is true apply the following rule
-> Lock 'Close Date' and 'Amount' 

 
For example if todays date was September 20th and I had a opportunity where its Close date is in October. The close date and amount should be locked. 

How can I get this rule to apply to opportunities? 

Thank you,

 
  • September 16, 2016
  • Like
  • 0
Hi, 

I need to replace our org's homepage with a dashboard that is already created. How can I do this in Lightning Experience UI.

I was looking at the following -  https://developer.salesforce.com/forums/?id=906F000000098mcIAA 
However I don't think the following HTML custom component hack will not work in Lightning Experience.


<iframe src="<full path to your page>"></iframe>

Thank You,
AR

 
  • August 17, 2016
  • Like
  • 0