Wednesday, September 13, 2017

Replace Special Characters with Hyphen in a String


String value = 'tstu# is @ ' d ,s . "; dfs:';

value = value.replaceAll('[|,|.|\\,||"||:|~|!|@|#|$|%|^|&|*|_|+|=|<|>|?|\\(|\\)|\\{|\\}|\\;|\\\'"]', '-');

debug value: tstu is d s dfs:

Thursday, August 24, 2017

How do I check the 'Do not create a new opportunity upon conversion' check-box by default upon lead conversion?


The following solution allows an admin to customize a Salesforce org to automatically select the "Do not create a new opportunity upon conversion" checkbox on the lead conversion screen. This solution uses a Custom Button to REPLACE the standard "Convert" button on the Lead Page Layout.




Please note that this solution does not enable one to extend the same functionality when attempting to Convert a Lead after the using the "Find Duplicates" button, as that Page Layout is not currently customizable.

Custom Button Solution
To do this follow these steps:
  • Click on Setup | Customize | Leads | Buttons and Links
  • In the "Custom Buttons and Links" section, click on "New Button or Link"
  • Assign a Name and Label to the button. It is recommend to have the Name as "CustomConvert" and the Label set to "Convert".
  • Choose "Detail Page Button" in the "Display Type" field
  • Choose "Display in existing window without sidebar or header" in the "Behavior" field
  • Choose "URL" in the "Content Source" field
  • In the code section, type the following: /lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1
  • Remove the standard "Convert" button and add this new button on any Lead Page Layouts in the Detail Buttons Section where you would like this to take effect.


Here list of parameters you can use in the custom button:
Convert Lead
  • "Do not create a new opportunity upon conversion" checked -- nooppti=1
  • "Send Email to Owner" checked -- sem=1
  • "Opportunity Name" -- noopptt={!Lead.Name} - opty
  • "Converted Status" -- cstatus=New Status
Task Information
  • "Subject" -- tsk5_fu=Mission Critical Task
  • "Status" -- tsk12_fu=Deferred
  • "Priority" -- tsk13_fu=High
Description Information
  • "Send Notification Email" -- email_followup=0
  • "Comments" -- tsk6_fu=No Comment
Reminder
  • "Reminder" -- IsReminderSet_fu=0


Some old Task/Events not showing in Salesforce


About Archived Activities


Available in: All Editions except Database.com

Salesforce archives activities according to these conditions.

  • Events with a due date greater than 365 days old
  • Closed tasks with a due date greater than 365 days old
  • Closed tasks without a due date and created more than 365 days ago
Additional considerations for activity archiving:
  • Archiving occurs weekly at approximately 5:00 AM Greenwich Mean Time (GMT) on Saturday.
  • Archived activities can be viewed only in export files, printable view, or by clicking View All on the Activity History related list. You can also view an archived activity if you know the URL for the activity.
  • Administrators can delete archived activities using Mass Delete.
  • Archived tasks are not included in reports. However, you can report on open or completed tasks.
Excluding old, closed activities from the activity reports increases the performance of these reports so that managers can quickly see where their reps are spending their time.

Activities that meet the following conditions are archived and not available in reports, list views, or through search:

1. Events with a due date greater than 365 days old.

2. Closed tasks with a due date greater than 365 days old.

3. Closed tasks with no due date will be archived based on the create date.

However, the activities that are more than one year old are still visible from the record they are associated with. Open tasks will not be archived. For example, you can see all activities {ever} delete associated with an account, contact, lead, opportunity, case or campaign when you view that record. Simply click on the "view all" button to see a complete view of all activities. Old activities are also included in the printable view for each record.

If you want, you can log a Feature Activation case with salesforce to extend the archive period. The period can be extended up to 5 years instead of the default archive time limit of one year. Extending this limit for activity archiving may potentially have an impact on performance and data storage.

For example, increasing the time limit for archiving activities may impact the performance of activity reports and list views if they are not efficiently scoped by filter criteria.

For organizations with small activity data volumes, this impact may be negligible.

Thursday, August 17, 2017

Insufficient Privileges error when user tried to create a new Child object record from Master Object.



If particular user has all the permission on child record and having the read/Edit/Create permission on Master record then we can't able to create child record until e have Modify All permissions, but it's not good to give the Modify All to all profiles. Solution: Edit the master detail field and in

Sharing Setting Select the minimum access level required on the Master record to create, edit, or delete related Detail records: Read Only: Allows users with at least Read access to the Master record to create, edit, or delete related Detail records.

as shown in below image:

Thursday, August 10, 2017

How do I check the 'Do not create a new opportunity upon conversion' check-box by default upon lead conversion?


The following solution allows an admin to customize a Salesforce org to automatically select the "Do not create a new opportunity upon conversion" checkbox on the lead conversion screen. This solution uses a Custom Button to REPLACE the standard "Convert" button on the Lead Page Layout.



Please note that this solution does not enable one to extend the same functionality when attempting to Convert a Lead after the using the "Find Duplicates" button, as that Page Layout is not currently customizable.

Custom Button Solution
To do this follow these steps:
  • Click on Setup | Customize | Leads | Buttons and Links
  • In the "Custom Buttons and Links" section, click on "New Button or Link"
  • Assign a Name and Label to the button. It is recommend to have the Name as "CustomConvert" and the Label set to "Convert".
  • Choose "Detail Page Button" in the "Display Type" field
  • Choose "Display in existing window without sidebar or header" in the "Behavior" field
  • Choose "URL" in the "Content Source" field


In the code section, type the following: /lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1 Remove the standard "Convert" button and add this new button on any Lead Page Layouts in the Detail Buttons Section where you would like this to take effect. Note:

Further Customization to the lead convert page is not yet supported. Like making task unrequired. And point to the related ideas link:

https://success.salesforce.com/ideaView?id=08730000000Bra8AAC

Thursday, June 16, 2016

How to show image from static resource in Visualforce pages

Example
apex:image id="theImage" value="/img/myimage.gif" width="220" height="55"/>

The example above renders the following HTML:
img id="theImage" src="/img/myimage.gif" width="220" height="55">

Resource Example

The example above renders the following HTML:
img id="theImage" src="/myResourceImage" width="200" height="200">

Zip Resource Example
apex:image url="{!URLFOR($Resource.TestZip, 'images/Bluehills.jpg')}" width="50" height="50" />

The example above renders the following HTML:
id="theImage" src="[generatedId]/images/Bluehills.jpg" width="50" height="50"/>

Sample Calculator using Salesforce Site

Salesforce Site Example..

Wednesday, June 15, 2016

What is Salesforce


What is Salesforce?

Salesforce.com is a cloud computing and social enterprise software-as-a-service (SaaS) provider based in San Francisco. It was founded in March 1999, in part by former Oracle executive Marc Benioff.

Salesforce CRM is a SaaS product of Force.com. It is the world leading CRM tool with the most innovative features to manage your presales, sales, aftersales and marketing activities.

This was about the standard Salesforce CRM features which are easy to use most innovative and highly automated system which makes your crucial data to be managed in the most effwctive way. This data management on salesforce called practices in lead management, account management, contracts management, your sales pipeline and forcasting in the most effective tracking, customer support management. Reporting and analytics was never so easy before since salesforce started highend reporting and dynamic dashboards you can view your data in one place.

Now its open end, force.com platform which gives you freedom to develop, customise and configure your own system for any instance not just the standard CRM functionality. You can develop your own applications like warehouse management system, recruitment and payroll management, project management, surveys etc and all this too without knowing any coding ( Programming Skills). 80% customization and 20% coding makes salesforce most efficient tool for any organisation.

more about to know by clicking below links:

https://www.youtube.com/watch?v=xP1eowUbSoE
Sample Calculator using Salesforce Site

Salesforce Site Example..