Migrating Opportunity line item

This post is a continuation of my earlier post on Product, Pricebook and Pricebook entry.Opportunity Product(line item) is a junction object between opportunity and pricebookentry table.List of fields in opportunity products ID OPPORTUNITYID PRICEBOOKENTRYID CURRENCYISOCODE QUANTITY TOTALPRICE UNITPRICE LISTPRICE SERVICEDATE DESCRIPTION Fields indicated in red are mandatory fields and fields which are in grey are […]

Escalation Queues and workflows

I recently had a need to escalate a case which has status value new and in a queue for 2 hours, So that if nobody picks up the case it would be escalated to manager.It took me about a day to figure out how to write the entry criteria to check whether the case is […]

Loading Converted Leads

      When you are migrating data from one system to another there will be a need to load the leads as converted as they would have been already converted in the source system.    First step is to raise the case with salesforce.com to open up the audit fields for your organisation. The fields CONVERTEDACCOUNTID, CONVERTEDCONTACTID, […]

Rendering VF page as pdf and sending pdf as an attachment from a list view

Thought i would share something which i needed to work on. I thank Jeff Douglas for his awesome post which helped me in this assignment.Requirement     There is a custom visualforce page which is rendered as pdf. There is a button on contact detail page which when clicked would call this vf page. These […]

Setting a child record to play a unique primary role to parent through config

There are many use cases where there is need to set one of the child record as primary and when another child record is updated as primary it should throw up an error saying that primary record already exists (similar to contact roles function). Many of  the developers would suggest an apex trigger solution But […]

List of items that cannot be deployed in salesforce

Recently when I was deploying configuration for an org which has not gone live, into UAT I made note of manual tasks as i need to reuse that for deploying from UAT to production. I thought i will add few more items on the list to the list i already had. These items had to […]

Salesforce and WSSE security headers

I wanted to name this post as WSSE security header or How i lost my war with the webservice team much like this movie (If you have not watched this i would strongly recommend to watch it). The requirement looked pretty straight forward consume wsdl , send the request and handle the response. But we faced the issue […]

Prevent inserting duplicate records without coding!!!

Hi Friends,Today implemented this simple technique to prevent inserting  duplicate records ( records with same name) In one of my customer’s org… there was a trigger written on a campaign object to prevent inserting campaign with same name…some developer wrote it few months back… though its a simple trigger but there was a logical bug in it…. however when our system […]

Modal dialog in VisualForce page using Jquery

{!$Label.GW_Volunteers__labelReturnToCalendar}     null}” > {!$ObjectType.Contact.Fields.Volunteer_Skills__c.Label}: null}” > , var x = JobShiftDateTimeString(‘{!shift.Start_Date_Time__c}’, ‘{!shift.Duration__c}’); OpenSignUpDlg(‘{!job.Id}’, ‘{!shift.Id}’, ‘{!JSENCODE(job.Name)}’, x); return false;” >{!$Label.labelLinkSignUp}   {!$Label.GW_Volunteers__labelReturnToCalendar} styleClass=”{!IF(f.Type == ‘Long Text Area’, ‘cssInputFields cssTextArea’, ‘cssInputFields’)}” /> styleClass=”{!IF(f.Type == ‘Long Text Area’, ‘cssInputFields cssTextArea’, ‘cssInputFields’)}” /> immediate=”false” status=”statusSignUp” /> {!$Label.labelVolunteerSignupThankYou}