• Mammu4
  • 15 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 22
Anyone has idea on mergiong duplicate contacts which are not linked to Accounts??

We are trying to create a custom percentage formula field but we are getting an Syntax error.  This field checks to see if the calculated percent is less than 100%, if it is greater than 100% the value should be left at only 100% but otherwise leave it at the given formula. So far we have this;
IF((Total_Booked__c / Product__c) > 1 ,​​ 1 ,(Total_Booked__c / Product__c)) 

Please hlep us figure out the error.

Thank You !
Hello everyone,

I find myself at a loss with a request for a worlflow rule. The request is such:

When lookup fields A or B on an Account are populated, trigger Checkbox C on related Opportunities to be marked True.

How do I set the formula to recognize any input in fields A or B as the trigger as opposed to specific input? Anyone know?

Thank you in advance!
We set up a custom case record type for a team comprised of community users. THe users are unable to edit the case status of cases they work on. I've done the following:
Profile: Read, Create, and edit Cases are all checked
Role : Full acess to edit cases under the case team role

Any help would be appreciated. Thank you. 
Is there a way to create a button that takes you back to the previous record?

I have a custom button that navigates out of a case to allow us to fill another area but to go back to the case we were working on we have to press the case number in a lookup field. A button would help?
Hi Guys

I have one requirment to search and export that record into excel.for example i have one function to search record based on date.After record search on a perticular date i want to one custom button which could export that record into excel...

This page for Export
<apex:page controller="dateInPBTbaleControllernewOk " contentType="txt/xml#myTest.xls" cache="true">
<apex:outputText value="{!xlsHeader}"/>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 <Style ss:ID="s1">
 <Font ss:Bold="1"/>
 <Worksheet ss:Name="Contacts">
 <Table x:FullColumns="1" x:FullRows="1">
 <Column ss:Width="170"/>
 <Column ss:Width="280"/>
 <Column ss:Width="330"/>
 <Cell ss:StyleID="s1"><Data ss:Type="String" >Mastr Code</Data></Cell>
 <Cell ss:StyleID="s1"><Data ss:Type="String" >Master Name</Data></Cell>
 <Cell ss:StyleID="s1"><Data ss:Type="String" >Credit Balance</Data></Cell>
  <Cell ss:StyleID="s1"><Data ss:Type="String" >Debit Balance</Data></Cell>
 <apex:repeat value="{!listAccount}" var="contact">
 <Cell><Data ss:Type="String">{!contact.Master_Code__c}</Data></Cell>
 <Cell><Data ss:Type="String">{!contact.Master_Name__c}</Data></Cell>
 <Cell><Data ss:Type="String">{!contact.Credit_Balance__c}</Data></Cell>
 <Cell><Data ss:Type="String">{!contact.Debit_Balance__c}</Data></Cell>
This is for search
<apex:page standardController="MasterCopy__c"  extensions="dateInPBTbaleControllernewOk"  showHeader="false" sidebar="false" >

<apex:pageMessages ></apex:pageMessages>
<style type="text/css" media="print">
@media print
#non-printable { display: none; }
#printable {
display: block;
width: 100%;
height: 100%;

<style type = "text/css">
        .colHeadr {text-align:center;}

        <apex:define name="body">
            <div style="width:1500px;margin: 0px auto 10px auto;border: 1px solid black;">
    <apex:form id="tableId">
        <apex:pageBlock >
                    <b><apex:outputLabel value="Trial Balance Report On: "  style="font-weight: bold;color:light blue;"/></b>
                     <apex:inputField value="{!account.DateUpdate__c}" style="font-weight: bold;color:black;" required="false"/>
                   <!--- Trial Balance Report On: <apex:input type="date" value="{!dat}"/>-->
                 <apex:commandButton value="Display" action="{!displaingTable}" reRender="tableId" style="font-weight: bold;color:black;" oncomplete="window.opener.location.refresh();" />
                 <apex:commandbutton value="Export" action="{!exportToExcel}"/>
        <b><apex:commandLink id="printable"  onclick="JavaScript:window.print();" value="Print"/></b> <br/><br/><br/>
       <center> <b><h5>Trial Balance Report</h5></b></center>
                 <apex:outputPanel rendered="{!If(totalRevenue != totalRevenue1,true,false)}">
                 <apex:outputLabel style="font-weight: bold;color:red;font-size:15px;padding-left:49%"> Debit and Credit Balances do not match. </apex:outputLabel>
                 <apex:outputPanel rendered="{!If(account.DateUpdate__c== null,true,false)}">
                 <apex:outputLabel style="font-weight: bold;color:blue;font-size:15px;padding-left:1%" > Please enter date to fetch accurate results. </apex:outputLabel>
                 <apex:dataTable value="{!listAccount}" var="record" border="1" cellpadding="1" cellspacing="0" bgcolor="#DAFFFF" style="font-family:verdana;color:Black;font-size:12px;height=18px;width:100%;" >
                 <!----<apex:pageblockTable value="{!listAccount }" var="record">---->
                  <apex:column headerValue="Master Code" Value="{!record.Master_Name__c}" headerClass="colHeadr" style="font-family:Cambria;color:Black;font-size:18px;height=20px;width:20%;"  >
                     <!----  <apex:column headerValue="Master Code">
                       <apex:outputPanel >
                            <apex:commandLink action="{!Go}">
                               {!record.Master_Name__c}<apex:param name="Id" value="{!record.id}"/>
                    <apex:column value="{!record.Master_Code__c}" headerValue="Master Name" headerClass="colHeadr" style="font-family:Cambria;color:Black;font-size:18px;height=20px;width:100%;"/>
                    <apex:column value="{!record.Debit_Balance__c}" headerValue="Debit(+)" style="font-family:Cambria;color:Black;font-size:18px;height=20px;width:100%;" headerClass="colHeadrRight" dir="RTL">
                     <apex:facet name="footer" >
                   <!---- <apex:outputText value=" Rs.{!totalRevenue}<br/> Rs.{!totalRevenuee}<br/>-----------------<br/> Rs.{!totalRevenuee1}" style="font-weight: bold;color:green;font-size:12px;height=18px;" escape="false">
                    <apex:outputText value="Rs.{0, number, ###,###,###,##0.00}"   style="font-family:Cambria;color:Black;font-size:18px;height=20px;width:100%;float:right;font-weight: bold;" >
                        <apex:param value="{!totalRevenue}"  />
                    <apex:column value="{!record.Credit_Balance__c}" headerValue="Credit(-)" style="font-family:Cambria;color:Black;font-size:18px;height=20px;width:100%;"  headerClass="colHeadrRight" dir="RTL">
                    <apex:facet name="footer" >
                   <apex:outputText value="Rs.{0, number, ###,###,###,##0.00}"  style="font-family:Cambria;color:Black;font-size:18px;height=20px;width:100%;float:right;font-weight:bold;"  >
                        <apex:param value="{!totalRevenue1}"  />
public with sharing class dateInPBTbaleControllernewOk {

    public dateInPBTbaleControllernewOk() {


    public MasterCopy__c account{get;set;}
    public List<MasterCopy__c> listAccount {get;set;}
    public Double totalRevenue {get;set;}
    public Double totalRevenue1 {get;set;}
    public Double totalRevenuee {get;set;}
    public Double totalRevenuee1 {get;set;}
    public String xlsHeader {
        get {
            String strHeader = '';
            strHeader += '<?xml version="1.0"?>';
            strHeader += '<?mso-application progid="Excel.Sheet"?>';
            return strHeader;
    public Date dat {get;set;}
    public Map<Date,List<MasterCopy__c>> mapOfDateWithEntry;

    public dateInPBTbaleControllernewOk(ApexPages.StandardController controller){
        account = new MasterCopy__c();
        totalRevenue = 0;
        totalRevenue1 = 0;
        totalRevenuee = 0;
        totalRevenuee1 = 0;
   public void setValues(){
        listAccount  = new List<MasterCopy__c>([SELECT id,Name,  Closing_Balance__c,Credit__c,Date__c,DateUpdate__c,Debit__c,Debit_Balance__c,Credit_Balance__c,
                        FROM MasterCopy__c
                        order by Master_Name__c ASC ]);
        mapOfDateWithEntry = new Map<Date,List<MasterCopy__c>>();
        List<MasterCopy__c> listOfEntryData;
        for(MasterCopy__c entry : listAccount){
            if(entry.DateUpdate__c != null){
                    listOfEntryData = new List<MasterCopy__c>();
   public void displaingTable(){
        if(account.DateUpdate__c!= null){
            totalRevenue = 0;
            totalRevenue1 = 0;
            totalRevenuee = 0;
            totalRevenuee1 = 0;
            system.debug('Map '+mapOfDateWithEntry);
            Set<Date> allDateSet = mapOfDateWithEntry.keySet();
                listAccount = mapOfDateWithEntry.get(account.DateUpdate__c);
            else {
                List<Date> sortedDateList = new List<Date>();
                Boolean isAnyPastDate = false;
                Date requiredDate;
                for(Date recordDate : sortedDateList){
                    if(account.DateUpdate__c > recordDate){
                        requiredDate = recordDate;
                        isAnyPastDate = true;
                    listAccount = mapOfDateWithEntry.get(requiredDate);
                    listAccount = new List<MasterCopy__c>();
                /*Date compareDate ;
                Integer count = 0;
                for(Date firstKeydate : allDateSet){
                    compareDate = firstKeydate;
                system.debug('Before Compare Date'+compareDate);
                for(Date keyDate : allDateSet){
                    if(keydate < account.DateUpdate__c && keydate > compareDate){
                        compareDate = keyDate;
                    if(account.DateUpdate__c < keyDate){
                        count ++ ;
                system.debug('After Compare Date'+compareDate);
                Date requiredDate ;
                if(allDateSet.size() == count){
                    requiredDate = [Select DateUpdate__c from MasterCopy__c Order by DateUpdate__c Desc LIMIT 1][0].DateUpdate__c;
                else {
                    requiredDate = compareDate;
                listAccount = mapOfDateWithEntry.get(requiredDate);*/
    catch(Exception e)
        //ApexPages.Message myMsg = new  ApexPages.Message(ApexPages.Severity.ERROR,'Sorry...... You have entered DUPLICATE MASTER CODE' );
           // ApexPages.addMessage(myMsg); 
           Apexpages.addMessage(new Apexpages.message(ApexPages.Severity.Error,' NO RECORD FOUND'));
     public void calculateTotalRevenue() {
     //for(MasterCopy__c acct2 : listAccount) {
           // if(acct2.Closing_Balance__c!= null)
               // totalRevenuee= acct2.Closing_Balance__c;
        for(MasterCopy__c acct : listAccount) {
            if(acct.Debit_Balance__c!= null)
                totalRevenue+= acct.Debit_Balance__c;
public PageReference exportToExcel() {
  return new Pagereference('/apex/ExportTrial');
    public void calculateTotalRevenue2() {
        for(MasterCopy__c acct2 : listAccount) {
            if(acct2.Closing_Balance__c!= null)
                totalRevenuee= acct2.Closing_Balance__c;
    public void calculateTotalRevenue1() {
        for(MasterCopy__c acct1 : listAccount) {
            if(acct1.Credit_Balance__c!= null)
                totalRevenue1+= acct1.Credit_Balance__c;


For instance I have some object  let's say "territory" which is look up fro user object

When I'm creating different territories and assigning them one particular  user let's say "user 1"

How Can I then  see related list of territories on this user?


I want to Prevent sales users (profile: Sales Rep) from modifying the 'Discount' field in opportunity record when the 'Sales Stage' has reached Negotiation/Review. But I would like sales managers (profile: Sales Mgr) to be able to edit the opportuntiy for any changes.

I believe it is possible through Validation Rule on Opportunity object but not able to come up with the right formula. Please let me help structure the VR.
Also can I achieve this using Field Level Security or Workflow rule ??

I am trying to have me events show up on my  custom javascript calendar my apex code is:

User-added image
I am very new to salesforce and developing as well. Can someone help me out?
  • July 01, 2016
  • Like
  • 0
Hi All,

Once the quote pdf is generated and email is sent, the quote status should auto set to Presented.

How can we do this. 

I am creating a Program Report which is being populated by multiple objects. At the very top it has all the general information for the program. In this instance we'll say "Name", "System", "Status", "State". So because we are rendering as a PDF but still wanted to use our companies font I created images to act as headers for each table and am not displaying the header for each pageblockTable including this one.

When I initially created it I used columnswidth to break the 6 columns to line up perfectly with the image above it. This worked regularly for multiple system and multiple program reports. I then brought the visualforce page into production and now my columnswidth aren't being maintained at all and I would need to adjust the numbers manually for whatever reason.

Here is the apex code that is creating the table. And depending on the program these widths change, and it has nothing to do with the information in the cells as the information won't fill a whole cell, it is at most 7 letters. Like I said, when this was created, those % values worked fine, but now they aren't and what's even weirder to me is sometimes the table will only fill up half the page, so the last column ends at half the page length, sometimes 70% of the page length but never like it was in the Sandbox

<apex:pageBlockSection columns="1">
<apex:pageblockTable headerClass="hideTableHeader" value="{!myProgram}" var="ProgramID" columnsWidth="30%, 22%, 12%, 12%, 12%, 12%">
<apex:column styleclass="ProgName" value="{!ProgramID.name}"/>
<apex:column styleclass="topContent" value="{!ProgramID.Electrical_System__c}"/>
<apex:column styleclass="topContent" value="{!ProgramID.Bootloader__c}"/>
<apex:column styleclass="topContent" value="{!ProgramID.Base_Program__c}"/>
<apex:column styleclass="topContent" ><apex:outputText value="{!if((myProgram.Active__c)=true, "Active", "Inactive")}"/></apex:column>
<apex:column styleclass="topContent"  value="{!myProgram.Status_Reason__c}"/>

I have a junction object Contact Hobby which has Master detail relationship to Contact and Hobby objects.

I have to import data from csv file which has 2 columns  Contact Name, Hobby Name. How can I import this csv using import wizard or data loader.

Do I need to add id columns for the master records first ?

Hi together,

i have the following problem:
I created a text email template with several if statements. the following returns nothing.
{!IF(ISPICKVAL(Case.LP_Rental_Car_needed__c, "Yes"), "Fahrzeugart: " & Case.LP_CategoryNeededRentalVehicle__c,"whatever")}
When I delete the concatenation: ---> & Case.LP_CategoryNeededRentalVehicle__c <--- it works.
When I write this merge field solo: {!Case.LP_CategoryNeededRentalVehicle__c} it returns me the input.
Why is the concatenation not working?

best regards and thanks in advance,

I have set private access to Account records on my administrator profile in sharing settings section

User-added image

And for example I want to extend Account records  access with one particualr user. For this option I  chose manual sharing. and added sharing in my Administrator profile with another user as below 

User-added image

But as a result Jenifer manager still dont't see any Acoount records. 

User-added image

What the problem is? Are there any rules of sharing settings, sharing rules, object, field level security  priority execution?



How to filter columns in a related list?

We use the InsideSales Domino List, which logs calls with tasks upserted from their external system. Right now, our calls are inconsistently logging to Salesforce, and InsideSales said they are seeing the following error:

Upsert on Salesforce Failed as access user for the following reasons:
CODE: UNKNOWN_EXCEPTION MESSAGE: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30170000000XjcB. Contact your administrator for help.

MESSAGE: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30170000000XjZC. Contact your administrator for help.

MESSAGE: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30170000000CiW5. Contact your administrator for help.

The version ID included in the error message shows me an "Insufficient Privileges" error (even though I'm a sys admin), and we have no problem creating or updating tasks within Salesforce. How can I identify the process or flow that is triggering this error, and how can I figure what's wrong with it?

Thanks for your help!
Hi All,

When ever trying to create a contact iam getting the error like Workflow Action failed to Trigger flow error  .For reference find below screenshot.Can you please any one help me on this.

I can see that no process builder created on contact.What will be the reason for this error?

User-added image