• mramos
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hello,

I have an Opportunity New button that overrides the std New button, but it is behaving incorrectly . The button works by taking the user to the recordtypeselection with some parameters to passthrough, as so:

/setup/ui/recordtypeselect.jsp?ent=Opportunity&retURL={!Account.Id}&save_new_url=/{!("/006/e?accid="+Account.Id+"&opp3="+LEFT(Account.Name, 30))}

The New Opp page is overriden with a custom VF page that will first run a redirect action method, so that users creating an "RP" opportunity will be taken to the standard page while the rest will remain in the custom opp edit page. There is a profile "Sales Rep" that has only access one record type and not RP and an "RP Sales Rep" with access only to RP recordtype. 

When a User with several recordtype access clicks the button it is fine since they are taken to the recordtypeselect page and then the parameters are sent to the VF page.

The problem is that some users do not have access to the recodtypeselect page since they only access one recordtype as default and therefore are taken directly to the new default opp page and the parameters are not added. How can I overcome this????

User with multiple rec type access new Opp URL: 
https://c.cs22.visual.force.com/apex/OppOverrideEdit?accid=00117000006ZY5X&opp3=Test+SR+acc&RecordType=01220000000DzLl&ent=Opportunity&save_new=1&sfdc.override=1

User with only one default recordtype, new opp page url (this is the one not working):
https://c.eu0.visual.force.com/apex/OppOverrideEdit?ent=Opportunity&save_new=1&sfdc.override=1
 
  • December 09, 2014
  • Like
  • 0
Hello,

I am at a loss, I have tried everyhting I know to try and get a Custom button in the Contract to pass a currency value in the URL but I keep getting "System.TypeException: Invalid decimal: " error. I first tried passing in the CurrencyIsoCode along with the currency field in the URL, but I still get the error:

"/apex/OppOverrideEdit?contrId={!Contract.Id}&returl={!Contract.Id}&accId={!Contract.AccountId}&paroppid={!Contract.OpportunityId__c}&pps={!Contract.Price_Per_Slide_in_contract__c}&CurrencyIsoCode={!Contract.CurrencyIsoCode}";

The issue is that it is passing the currency and also a comma value, for example: value in field 12.34, shown in the contract page as 12,34 due to user locale settings is passed as  USD 12,34 instead of the decimal value.

Then I tried to add some code in the OppOverrideEdit controller to try and remove both the currency and the comma replacing it with a period as so:
 
String strNewPPS   = ApexPages.currentPage().getParameters().get('pps');
        if(strNewPPS != null){
            strNewPPS = strNewPPS.normalizeSpace();
            strNewPPS = strNewPPS.contains(',') ? strNewPPS.replace(',', '.') : strNewPPS;
            strNewPPs = strNewPPS.right(strNewPPs.length()-3);
            system.debug('### strNewPPS: ' + strNewPPS);
        }
        mOpportunity.fcNew_PPS__c    = strNewPPS != null ? Decimal.valueOf(strNewPPS) : null;

But now I get the same error but this time the value is 12.34, it is still giving an error no matterwhat I put in it. How can I pass this value in the URL without getting this error???
  • October 24, 2014
  • Like
  • 0
Hello,

I am at a loss, I have tried everyhting I know to try and get a Custom button in the Contract to pass a currency value in the URL but I keep getting "System.TypeException: Invalid decimal: " error. I first tried passing in the CurrencyIsoCode along with the currency field in the URL, but I still get the error:

"/apex/OppOverrideEdit?contrId={!Contract.Id}&returl={!Contract.Id}&accId={!Contract.AccountId}&paroppid={!Contract.OpportunityId__c}&pps={!Contract.Price_Per_Slide_in_contract__c}&CurrencyIsoCode={!Contract.CurrencyIsoCode}";

The issue is that it is passing the currency and also a comma value, for example: value in field 12.34, shown in the contract page as 12,34 due to user locale settings is passed as  USD 12,34 instead of the decimal value.

Then I tried to add some code in the OppOverrideEdit controller to try and remove both the currency and the comma replacing it with a period as so:
 
String strNewPPS   = ApexPages.currentPage().getParameters().get('pps');
        if(strNewPPS != null){
            strNewPPS = strNewPPS.normalizeSpace();
            strNewPPS = strNewPPS.contains(',') ? strNewPPS.replace(',', '.') : strNewPPS;
            strNewPPs = strNewPPS.right(strNewPPs.length()-3);
            system.debug('### strNewPPS: ' + strNewPPS);
        }
        mOpportunity.fcNew_PPS__c    = strNewPPS != null ? Decimal.valueOf(strNewPPS) : null;

But now I get the same error but this time the value is 12.34, it is still giving an error no matterwhat I put in it. How can I pass this value in the URL without getting this error???
  • October 24, 2014
  • Like
  • 0

Hi,

I have installed Salesforce for Outlook. I have synced the Contacts, Events and Tasks from slaesforce to outlook and also the Add email button.

This would sync email from outlook to salesforce.

Is it possible to sync the Salesforce emails to outlook automatically?

 

Please help me out if anyone has any idea.

 

 

Thanks..

HI All,

 

I  am New to configuration ,  I  have configured  MyOutlook(2007)    with  " Internet  email settings(not with microsoft exchage server) on "WIndows 7 "and then    I configured  outlook with salesforce  developer account  using  "salesforce for Outlook" . I am  able to Sync  contacts  ,events and  tasks..  But  i am not  able   to  visible "ADD Email"  in the Outlook  tool bar , I have read all the documents  regarding "Add email button" and every thing configured  Perfectly . But  I couldn't find the Solutions  .Please   giude me to resolve this issue. Is  Imap/pop3 is not supported to "Add email"?