• SFDC Devl
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 22
    Replies
Hello, My customer wants to track projected revenue and actual revenue for a given period of time and the amount by month.
They need the ability to enter the date range for projected and the amount for that period. The same for actuals.
For example- If the date range for projected is 12 months and the amount (could be opportunity amount) projected is $12,000. They want to split this amount for each month equally (to start with) and have the ability to update it. The same with actuals (after the contract is signed and amount can be the Contract amount).

The idea is to compare projected vs actuals by month. See attached picture for an idea on how the report should like...User-added imageUser-added image

Options looked at---
1) Custom object with the date range fields and amount seperately for projected vs actual.---> downside of this is customer doesnt want to fill the data for every month. We dont want to give the user an option to enter the date range and amount and system automatically create the records. This may soon get into several customizations and my team cannot support this at the moment.

2) Opportunity and Product Revenue Schedules- Out of the box feature----> we dont use products at the moment for this customer. Even if we convince the customer with the Opportunity and Product best practices; The schedules option on the product only have an option to track either projected or actuals. Was thinking of tracking projected on Opportunity and actuals on Contract but there is no feature avalaible on Contracts to track actual amount for each month. PS-We are using a custom object for Contracts.

3) I have started looking into Einstein analytics. Hopefully I can find something here...

Does anyone have thoughst or ideas on how to accomplish this? Any app exchange tools that can do this are suggestable.
 
Hello, I am trying to run data loader from command line with an encrypted password and the key. It doesnt seem to work and says invalid password . Here are the steps I followed
Open Command prompt
cd C:\Program Files\salesforce.com\Data Loader\bin
C:\Program Files\salesforce.com\Data Loader\bin encrypt.bat -g secretkey
It gave a string and I saved it to  "folderpath/key.txt"

C:\Program Files\salesforce.com\Data Loader\bin encrypt.bat encrypt.bat -e passwordsecuritytoken "folderpath/key.txt"
It gave another long string

I copied this in the process-conf.xml file

                <entry key="sfdc.username" value="xyx"/>                
                <entry key="sfdc.password" value="encryptedpasswordstring"/>
                <entry key="process.encryptionKeyFile" value="D:\SFDC\DataLoader\Process\key.txt"/>

When I run the bat file in the command prompt, the process starts and fails because of invalid passwor. I tried to decrypt the encrypted password and it matches. So i am not really sure whats happening.

Can anyone think of anything that I could have missed?

Thank you!


 
Hello,

I am trying to play with Macros in service console. I was able to update the settings and get the macro created but having difficulty with the instructions. I am unable to select a context (no drop down options available) to proceed further with the instructions. I must be missing something really silly. Does anyone know what is it?

Thank you!
Hello,

I am looking for a tool for versioining Apex code. I have looked at Perforce and in the process of figuring out the implementation part. Has anyone used Source Tree/Git? Any suggestions on Perforce vs Source Tree?

Thank you for your help in advance!
Hello,

I have an Apex trigger (after insert) on Opportunity which updates the Contact on that Opportunity upon insert. While inserting thousands of Opportunities via Data loader, the 199 Opportunities are inserted but 199 Contacts are not updated for the whole batch if one opportunity insert fails in a batch of 200 records.

Do you know of a way where trigger does a partial update of the batch with successful inserts.
I tried using try and catch, Database.SaveResult[] result = Database.update(contactList, false); but no luck

Can anyone suggest how to resolve this? 
Hello,

We are using google group to create cases in salesforce. Google group has individual users and salesforce service email address. When an email is sent to the group, it forwards the email to all the members of the group. All users in the group get a one email but the salesforce service address gets 2 emails (confirmed from the email log from premier support sfdc).

I have tried couple of things
- Sent email directly to salesforce service address ---It creates one Case (no duplicates)
- Removed all users from the group and just added salesforce service address.---- It created duplicate cases
- Removed all the memebers from the group and just added a generic email box address (which had a forwarding to salesforce service email address) ---- Received one email to the generic email box but duplicate cases in SFDC
- Removed all the memebers and added my personal gmail address (which had forwarding to salesforce service email address) to the group. --- Received one email in my inbox and one case (no duplicates) in SFDC.

Can someone help me troubleshoot?

Thank you!
Hello,

I have a validation rule to prevent users (other than profiles in formula) editing Contacts with certain criteria (criteria field) except two fields (field1 and field2). 

OR( 
AND( 
AND( 
$Profile.Id <> "xyz", 
$Profile.Id <> "xxx", 
), 
NOT(ISCHANGED(Field1__c)), 
NOT(ISCHANGED(Field2__c)), 
NOT(ISNEW()), 
NOT(ISCHANGED(criteriafield__c)), 
NOT(ISPICKVAL(criteriafield__c,'')) 
), 

AND( 
AND( 
$Profile.Id <> "xyz", 
$Profile.Id <> "xxx", 
), 
NOT(ISCHANGED(Field1__c)), 
NOT(ISCHANGED(Field2__c)), 
NOT(ISNEW()), 
ISCHANGED(Criteriafield__c), 
NOT(ISPICKVAL(PRIORVALUE(criteriafield__c),'')) 

)

I am testing as a user whose profile is NOT in the formula. When I manually edit Field1 or Field 2, I am able to update the contact successfully but when testing as same user, trigger update fails due to the above validation rule.

I have an Apex trigger which updates conList. conList = [SELECT Field1 FROM Contact WHERE ID IN: IdList];    

Am I missing something? I know how to prvent validation rules from trigger but I want to understand what is the difference between manually updating Vs trigger updating as a same user.

Can someone help me?

Thanks!
Hello,

I am working on integrating Salesforce.com and external system (ERP).  I am making a call out using SOAP API

What I have provided to third party?
- Create a user for integration and shared the username,password&securitytoken
-Created an global apex class with webservice methods.
-Generated WSDL from above class
-Generated Enterprise WSDL

What I received from third party?
-WSDL (https end point)
-.PEM certificate and .pfx format certifcate

Development process on Salesforce side

I have generated a single Apex class (Gnerate from WSDL) from the WSDL I recieved from third party.

One of the classes generated is below

public class HTTPS_Port {
        public String endpoint_x = ‘bhla bhla…’;
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;



            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequest',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequestResponse',
              'WebServiceClient.YRequestResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.FStatus;
        }
    }


I have generated an apex class to call the third party service (above generated class). In this class I have to provide the following

public String clientCertName_x;// may be this is required if the certificate is generated with in SAlesforce org. So I might not need to pass this info.
        public String clientCert_x; // This is the certifcate which has based64. I am good with this
        public String clientCertPasswd_x; // what is the password i need to enter  here. I asked third party to give this password but they say don't have it. Where do i get this password from?

My call fails if I don't enter the password. Error is - CertPasswd cannot be null
If the give a blank string for the password, the Error is "Error MessageIO Exception: DER input, Integer tag error"

I am stuck with the password issue here. Can someone help me out if there is something to be on Salesforce side? Am I missing something?

Any help is greatly appreciated.

Thank you!


Hi,

I want to remove "Save & New" button on a custom object. I created a home page component and gave this (<script src="015Z0000000FJf7" type="text/javascript"></script>) in the body of the component.

I have placed this component on my home pagelayout.

I have created a .js file with below and uploaded to salesforce in Documents. Gave this document id above on the home page component

window.onload = hideBtns;

    function hideBtns()
    {
     this.bodyOnLoad();
    if(document.getElementsByName("save_new")[0]!=null)
    document.getElementsByName("save_new")[0].style.display = 'none';
    if(document.getElementsByName("save_new")[1]!=null)
    document.getElementsByName("save_new")[1].style.display = 'none';
    }

It is not working for me. I am able to see the button. Am I missing something? How to make this work? Also how to remove the button on a single custom object and leave the button on all other objects. I would appreciate your help.

Thank you.

Hi,

 

I want to show the standard error message on the same visualforce page without going away from the page. Code is working fine because it is not saving the record nor going further but the error is not displaying on the VF page. Can someone help me out? Thanks in advance.

 

Part of code from VF Page

<apex:form >
<apex:pageBlock title="Request">

<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}" reRender="errMsg"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>

<apex:pageMessages id="errMsg" />

</apex:form>

 

Part of Code from the Controller extension 

 

public pageReference save()
    { 

Database.SaveResult insertResult = Database.insert(newFeasibility,false);
        system.debug('Result.......'+insertResult.isSuccess());
          if (!insertResult.isSuccess())
             {
            errorMessage = '';             
              for(Database.Error err : insertResult.getErrors())
              {
                errorMessage += (err.getMessage() + '  ');
              }
              system.debug(errorMessage);
              ApexPages.Message errMsg = new ApexPages.Message(ApexPages.Severity.INFO, errorMessage);
              ApexPages.addMessage(errMsg);  
              return null;     
             }

     else 
        {
        if (OpportunityType == 'xyz')
        {
        PageReference redirecturl = new PageReference('/a0R/e?...have page url here');
           return redirecturl; 
         }   

else return null; 

}    

Hi,

 

I have a custom button '/a0R/e?retURL=%2Fa0R%2Fo&RecordType=012G00000017BdF&ent=01IG0000002FvXG&saveURL={!x__c.NumberId__c}'

x__c is a custom object and NumberId__c is a lookup field on x__c object. NumberId__c will be updated via trigger when only the above page is saved.

When the page is opened via custom button, the saveurl (or {!x__c.NumberId__c} is null)  but only when the page is saved {!x__c.NumberId__c}  will have a value. How to update the saveurl and navigate to another page.

 

Also, how to prepopulate the fields from one object to another via custom button and without using URL hack?

 

Thank you.

I am looking to encrypt attachments on Account and decrypt to sepcific users. I know how to do the encryption but it is encrypting the attachments on all the objects.

1) how to limit the encryption of attachments to a specific object ?

2) how to decrypt to the users?

3)do I need to develop Visual force page to show the attachments?

4)how to protect the key stored in custom settings?

 

Can someone guide me the process of decryption and show the attachments to some users in SFDC?  Thank you...

Hello,

I am trying to play with Macros in service console. I was able to update the settings and get the macro created but having difficulty with the instructions. I am unable to select a context (no drop down options available) to proceed further with the instructions. I must be missing something really silly. Does anyone know what is it?

Thank you!
Hello,

I am working on integrating Salesforce.com and external system (ERP).  I am making a call out using SOAP API

What I have provided to third party?
- Create a user for integration and shared the username,password&securitytoken
-Created an global apex class with webservice methods.
-Generated WSDL from above class
-Generated Enterprise WSDL

What I received from third party?
-WSDL (https end point)
-.PEM certificate and .pfx format certifcate

Development process on Salesforce side

I have generated a single Apex class (Gnerate from WSDL) from the WSDL I recieved from third party.

One of the classes generated is below

public class HTTPS_Port {
        public String endpoint_x = ‘bhla bhla…’;
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;



            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequest',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequestResponse',
              'WebServiceClient.YRequestResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.FStatus;
        }
    }


I have generated an apex class to call the third party service (above generated class). In this class I have to provide the following

public String clientCertName_x;// may be this is required if the certificate is generated with in SAlesforce org. So I might not need to pass this info.
        public String clientCert_x; // This is the certifcate which has based64. I am good with this
        public String clientCertPasswd_x; // what is the password i need to enter  here. I asked third party to give this password but they say don't have it. Where do i get this password from?

My call fails if I don't enter the password. Error is - CertPasswd cannot be null
If the give a blank string for the password, the Error is "Error MessageIO Exception: DER input, Integer tag error"

I am stuck with the password issue here. Can someone help me out if there is something to be on Salesforce side? Am I missing something?

Any help is greatly appreciated.

Thank you!


Hello, My customer wants to track projected revenue and actual revenue for a given period of time and the amount by month.
They need the ability to enter the date range for projected and the amount for that period. The same for actuals.
For example- If the date range for projected is 12 months and the amount (could be opportunity amount) projected is $12,000. They want to split this amount for each month equally (to start with) and have the ability to update it. The same with actuals (after the contract is signed and amount can be the Contract amount).

The idea is to compare projected vs actuals by month. See attached picture for an idea on how the report should like...User-added imageUser-added image

Options looked at---
1) Custom object with the date range fields and amount seperately for projected vs actual.---> downside of this is customer doesnt want to fill the data for every month. We dont want to give the user an option to enter the date range and amount and system automatically create the records. This may soon get into several customizations and my team cannot support this at the moment.

2) Opportunity and Product Revenue Schedules- Out of the box feature----> we dont use products at the moment for this customer. Even if we convince the customer with the Opportunity and Product best practices; The schedules option on the product only have an option to track either projected or actuals. Was thinking of tracking projected on Opportunity and actuals on Contract but there is no feature avalaible on Contracts to track actual amount for each month. PS-We are using a custom object for Contracts.

3) I have started looking into Einstein analytics. Hopefully I can find something here...

Does anyone have thoughst or ideas on how to accomplish this? Any app exchange tools that can do this are suggestable.
 
Hello, I am trying to run data loader from command line with an encrypted password and the key. It doesnt seem to work and says invalid password . Here are the steps I followed
Open Command prompt
cd C:\Program Files\salesforce.com\Data Loader\bin
C:\Program Files\salesforce.com\Data Loader\bin encrypt.bat -g secretkey
It gave a string and I saved it to  "folderpath/key.txt"

C:\Program Files\salesforce.com\Data Loader\bin encrypt.bat encrypt.bat -e passwordsecuritytoken "folderpath/key.txt"
It gave another long string

I copied this in the process-conf.xml file

                <entry key="sfdc.username" value="xyx"/>                
                <entry key="sfdc.password" value="encryptedpasswordstring"/>
                <entry key="process.encryptionKeyFile" value="D:\SFDC\DataLoader\Process\key.txt"/>

When I run the bat file in the command prompt, the process starts and fails because of invalid passwor. I tried to decrypt the encrypted password and it matches. So i am not really sure whats happening.

Can anyone think of anything that I could have missed?

Thank you!


 
Hello,

I am looking for a tool for versioining Apex code. I have looked at Perforce and in the process of figuring out the implementation part. Has anyone used Source Tree/Git? Any suggestions on Perforce vs Source Tree?

Thank you for your help in advance!
Hello,

I have an Apex trigger (after insert) on Opportunity which updates the Contact on that Opportunity upon insert. While inserting thousands of Opportunities via Data loader, the 199 Opportunities are inserted but 199 Contacts are not updated for the whole batch if one opportunity insert fails in a batch of 200 records.

Do you know of a way where trigger does a partial update of the batch with successful inserts.
I tried using try and catch, Database.SaveResult[] result = Database.update(contactList, false); but no luck

Can anyone suggest how to resolve this? 
Hello,

We are using google group to create cases in salesforce. Google group has individual users and salesforce service email address. When an email is sent to the group, it forwards the email to all the members of the group. All users in the group get a one email but the salesforce service address gets 2 emails (confirmed from the email log from premier support sfdc).

I have tried couple of things
- Sent email directly to salesforce service address ---It creates one Case (no duplicates)
- Removed all users from the group and just added salesforce service address.---- It created duplicate cases
- Removed all the memebers from the group and just added a generic email box address (which had a forwarding to salesforce service email address) ---- Received one email to the generic email box but duplicate cases in SFDC
- Removed all the memebers and added my personal gmail address (which had forwarding to salesforce service email address) to the group. --- Received one email in my inbox and one case (no duplicates) in SFDC.

Can someone help me troubleshoot?

Thank you!
Hello,

I have a validation rule to prevent users (other than profiles in formula) editing Contacts with certain criteria (criteria field) except two fields (field1 and field2). 

OR( 
AND( 
AND( 
$Profile.Id <> "xyz", 
$Profile.Id <> "xxx", 
), 
NOT(ISCHANGED(Field1__c)), 
NOT(ISCHANGED(Field2__c)), 
NOT(ISNEW()), 
NOT(ISCHANGED(criteriafield__c)), 
NOT(ISPICKVAL(criteriafield__c,'')) 
), 

AND( 
AND( 
$Profile.Id <> "xyz", 
$Profile.Id <> "xxx", 
), 
NOT(ISCHANGED(Field1__c)), 
NOT(ISCHANGED(Field2__c)), 
NOT(ISNEW()), 
ISCHANGED(Criteriafield__c), 
NOT(ISPICKVAL(PRIORVALUE(criteriafield__c),'')) 

)

I am testing as a user whose profile is NOT in the formula. When I manually edit Field1 or Field 2, I am able to update the contact successfully but when testing as same user, trigger update fails due to the above validation rule.

I have an Apex trigger which updates conList. conList = [SELECT Field1 FROM Contact WHERE ID IN: IdList];    

Am I missing something? I know how to prvent validation rules from trigger but I want to understand what is the difference between manually updating Vs trigger updating as a same user.

Can someone help me?

Thanks!
I will be implementing Partner Communities. I am testing in a dev org to confirm functionality. I have a Button on the Contact that executes javascript. It works fine from the internal org but gives this error from the community:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'UNKNOWN_EXCEPTION', faultstring:'UNKNOWN_EXCEPTION: Site under construction', }

The button code is
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")};
var dob = '{!Contact.Birthdate}';
var sal = '{!Contact.Annual_Income__c}';
var plandate = '{!Contact.Date_Entered_Plan__c}';
var inflation = '{!Contact.Expected_Raise_Per_Year__c}';

if( dob == '' || sal == '' ||inflation == '' || plandate == '')
{
alert('Please Validate Birthdate/Annual Income/Date Entered Plan/Expected Raise Per Year/ Spouse DOB');
}
else
{

sforce.apex.execute("GeneratePensionReport","attachReport", {id:"{!Contact.Id}"});
window.alert("Pension Report has been Generated and Attached." );
}

I think this issue has to do with the context - since it is running from the community it thinks it has a different domain.  Not sure how to address this.
Any help would be appreciiated.
Hello,

I am working on integrating Salesforce.com and external system (ERP).  I am making a call out using SOAP API

What I have provided to third party?
- Create a user for integration and shared the username,password&securitytoken
-Created an global apex class with webservice methods.
-Generated WSDL from above class
-Generated Enterprise WSDL

What I received from third party?
-WSDL (https end point)
-.PEM certificate and .pfx format certifcate

Development process on Salesforce side

I have generated a single Apex class (Gnerate from WSDL) from the WSDL I recieved from third party.

One of the classes generated is below

public class HTTPS_Port {
        public String endpoint_x = ‘bhla bhla…’;
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;



            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequest',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequestResponse',
              'WebServiceClient.YRequestResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.FStatus;
        }
    }


I have generated an apex class to call the third party service (above generated class). In this class I have to provide the following

public String clientCertName_x;// may be this is required if the certificate is generated with in SAlesforce org. So I might not need to pass this info.
        public String clientCert_x; // This is the certifcate which has based64. I am good with this
        public String clientCertPasswd_x; // what is the password i need to enter  here. I asked third party to give this password but they say don't have it. Where do i get this password from?

My call fails if I don't enter the password. Error is - CertPasswd cannot be null
If the give a blank string for the password, the Error is "Error MessageIO Exception: DER input, Integer tag error"

I am stuck with the password issue here. Can someone help me out if there is something to be on Salesforce side? Am I missing something?

Any help is greatly appreciated.

Thank you!


Hi,

I want to remove "Save & New" button on a custom object. I created a home page component and gave this (<script src="015Z0000000FJf7" type="text/javascript"></script>) in the body of the component.

I have placed this component on my home pagelayout.

I have created a .js file with below and uploaded to salesforce in Documents. Gave this document id above on the home page component

window.onload = hideBtns;

    function hideBtns()
    {
     this.bodyOnLoad();
    if(document.getElementsByName("save_new")[0]!=null)
    document.getElementsByName("save_new")[0].style.display = 'none';
    if(document.getElementsByName("save_new")[1]!=null)
    document.getElementsByName("save_new")[1].style.display = 'none';
    }

It is not working for me. I am able to see the button. Am I missing something? How to make this work? Also how to remove the button on a single custom object and leave the button on all other objects. I would appreciate your help.

Thank you.

Hi,

 

I want to show the standard error message on the same visualforce page without going away from the page. Code is working fine because it is not saving the record nor going further but the error is not displaying on the VF page. Can someone help me out? Thanks in advance.

 

Part of code from VF Page

<apex:form >
<apex:pageBlock title="Request">

<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}" reRender="errMsg"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>

<apex:pageMessages id="errMsg" />

</apex:form>

 

Part of Code from the Controller extension 

 

public pageReference save()
    { 

Database.SaveResult insertResult = Database.insert(newFeasibility,false);
        system.debug('Result.......'+insertResult.isSuccess());
          if (!insertResult.isSuccess())
             {
            errorMessage = '';             
              for(Database.Error err : insertResult.getErrors())
              {
                errorMessage += (err.getMessage() + '  ');
              }
              system.debug(errorMessage);
              ApexPages.Message errMsg = new ApexPages.Message(ApexPages.Severity.INFO, errorMessage);
              ApexPages.addMessage(errMsg);  
              return null;     
             }

     else 
        {
        if (OpportunityType == 'xyz')
        {
        PageReference redirecturl = new PageReference('/a0R/e?...have page url here');
           return redirecturl; 
         }   

else return null; 

}    

I have spent a day trying to resolve an issue and I am so close! But I think the final solution is beyond my abilities...

I have a custom object (Event) where I would like to hide the New button on the Object Tab - I want to force people to create the Event from the Related List on another object (Inquiry).

 

Initially I tried to override the Button with a simple error message page I made with guidance from this blog - http://rjpalombo.com/2012/04/override-a-standard-salesforce-page-with-visualforce/ - but that impacts the usage of the New button everywhere, including my Related List on Inquiry.

 

I got really excited by this post - http://forums.sforce.com/t5/forums/forumtopicprintpage/board-id/Visualforce/message-id/37818/print-single-message/false/page/1 - which lead me to override the custom tab with a simple Visualforce page with EnhancedList, or even just ListView - but both still include the New button.  There is a comment on that post that claims "If you just want to hide the new button, modify the selector" but I don't know how to do that.

 

Thanks in advance for any assistance! Hopefully I will eventually get past the copy-and-paste-other-peoples-markup phase...