• RobAlexander
  • NEWBIE
  • 73 Points
  • Member since 2014
  • Salesforce Solution Manager
  • Deloitte Digital


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 50
    Likes Given
  • 2
    Questions
  • 21
    Replies
I'm new to salesforce.please tell me what's the procedure to integrate salesforce with CTI.is it possible CTI integration in developer edition
When checking the challenge I get this message:

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: BEDOVIZO

What exactly is causing this error?
Hi,

I'm attempting to create a SOQL query (to merge data via Conga).  Specificically, I would like to retrieve records from the object "ContentVersions" as they relate to Files (ContentDocument) attached to a custom object called (Transmittal).  I am retireving them from Transmittal. I have written the following:
 
SELECT v.Title, v.FileType
FROM ContentVersion v
WHERE ContentDocumentId in
(Select j.ContentDocumentId From ContentDocumentLink j
Where j.LinkedEntityId = '{pv0}')

My query returns the following error, "Entity 'ContentDocumentLink' is not supported for semi join inner selects".

The sturcture, as I understand it is:
Transmittal
ContentDocumentLink (creates a m to m relationship between the Linked Entity (here Transmittal) and ContentDocument.
ContentDocument
Content Versions

I have reviewed the Content Object schema.

Is the query incorrect, or is it not supported?  If not what is a work-around? (Sorry I'm an amateur).

Thank for your help.
I am creating a Task and a Lead and linking them through the pre-chat form. When agent A accepts the chat request then a Lead and a Task is created and linked by default, when the same chat is transferred to Agent B only the Lead is being transferred and displayed. Is this regular behavior of Live Agent Transfer or do we need to provide additional privileges?
Hello, we have live agent enabled in our org and 3 agents to answer the incoming chats. All of the 3 agents have the same profile.
When a agent receive a chat request through the 'prechat' page a Lead, a Person Account and a Case are created in SF.
The agents should then see the chat tab plus a another tab with the Lead and the chat details (transcript) (see screenshot 'correct'). At the end of the chat from the agent side a Transcript is created, with a linked Case and Lead.
Since Monday 13/02/2017 for two of our agents in the 'chat page' they see only the chat and chat details tab, not the Lead tab. At the end of the chat the Transcript is saved but it isn't linked to any other Case nor Lead.
We saw that all of this is cause at the start of the chat the Lead isn't created anymore.

We tried to analyze the debug logs but when the error appears this is the only thing recorded:
Operation: /liveagent/chatrecordstab.apexp
39.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,INFO;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,FINEST;WORKFLOW,INFO
14:55:27.0 (70021)|USER_INFO|[EXTERNAL]|00520000005fyEB|officer5enitfres@gmail.com|Heure d'Europe centrale|GMT+01:00
14:55:27.0 (100697)|EXECUTION_STARTED
14:55:27.0 (106197)|CODE_UNIT_STARTED|[EXTERNAL]|VisualForce View State
14:55:27.0 (4491898)|CODE_UNIT_FINISHED|VisualForce View State
14:55:27.0 (5345702)|EXECUTION_FINISHED

In the last month or more we didn't modify anything about Live Agent or about the Profile of the Agents. We also can't comprehend how is it possible that 2/3 of our agents are having problems and the other one have no problems at all.

Is it possible that during the Spring '17 there were changes that disrupted our Live Agent implementation? What can we do to track down the error and fix it?
Thank you in advance
Maria Alberti
Hi,
This is a formula field with TEXT data type, but I get this error:    : (

Error: Incorrect number of parameters for function 'IMAGE()'. Expected 2, received 1

IF(
checkbox__c = TRUE,
IMAGE('/servlet/servlet.FileDownload?file=015w0000003GGGG')
)
I have a visualforce page I want to be able to retreive and display come custom metadata values.

Ideally I want it so that based on the value that is selected in a picklist from the standard controler, it will display a custom field on the matching custom metadata record.

The use case for this is, that in an RMA record the support person will choose the return location from a picklist. What I want is depending on the location selected the correct address should be displayed on the page (which is being rendered as a PDF)

I dont really want to set up a custom object for the addresses, as they wont change all that often, and I also dont really want to hard code them into the page if possible either.

Any suggestions would be greatly appreciated
 
I'm new to salesforce.please tell me what's the procedure to integrate salesforce with CTI.is it possible CTI integration in developer edition
Hi All,

Is there any appexchange tool or package available which can track user's activities such as how many times a user visited a particular vf page, how many times user visited a particular record, how many times user changed a particular field and so on?

Any help would be appreciated.

Thanks,
Pankaj

Hi Guys, 

I'm putting in a workflow to calculate pipeline stage based on what opportunity fields have been completed by the user. An aspect of this is that a user has to identify and document various decision makers at different stages (coach, technical buyer etc). I've been using a text field that the user has to write the name in as part of the workflow with no problem.

Now I'd like to change this text field to a lookup field and have the user have to select the decision makers from their existing contacts instead of write a name in a text box. I've set this up in the opportunity using lookup fields but I'm not able to find these lookup fields in the rule criteria fields in workflow rules and as such can't link them to pipeline stage. Does anyone know of any way around this? 

 

Thanks 

We have a requirement where we need to connect to salesforce from an intranet website with code written in JavaScript. We have the ConnectedApp created in Salesforce and we are following Username-Password OAuth2 flow. We are passing all the required parameters given below. We are POSTing this to the request URL given below.

var requestUrl = 'https://login.salesforce.com/services/oauth2/token';
requestUrl += '?username=USERNAME&password=PASSWORD_SECURITY_TOKEN&grant_type=password&client_id=CLIENT_ID_FROM_CONNECTED_APP&client_secret=AGAIN_FROM_CONNECTED_APP;
We tried connecting using JQuery AJAX call and JSforce libraries. We have also whitelisted the required domain in Salesforce via Setup --> Security Controls --> CORS.

We tried connecting to salesforce via the intranet site as well as another salesforce org using the same code. for both of the situations we are getting below error. 

User-added image

In case if image does not load 
 
XMLHttpRequest cannot load https://login.salesforce.com/services/oauth2/token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://lightningcheck-dev-ed--c.ap2.visual.force.com' is therefore not allowed access.

The origin is there in the Request Header as checked in Browser Console, however, the 'Access-Control-Allow-Origin' parameter is not there in response header from Salesforce.

Am I missing any setting here or it is not something Salesforce currently supports? Any help appreciated, thanks.
 
Hi,

We have a SF package related to chatter and communities. This package requires communities to be enabled in an org to install. However in one of our client's org, the Package Installation is failing with error for Missing Organization Feature: Customer Success Portal. We do not have any dependency on this feature as such, however the package is also showing a dependency on this feature under the package details in the development org. We are able to successfully install the package on our test orgs even when Customer Portal is not enabled showing that there should not be any dependency on this feature. We also have went ahead and created a Trial org (to check) which does not have the customer portal feature and we just enabled Partner community in the org. And we were able to successfully deploy the complete code and config to the new trial EE org (with customer portal feature totally not existing. showing up in that org). So our dependency is communities and not the customer portal which is verified with the complete code being deployed to the Trial org without any issues. However the package seems to be showing a wrong dependency. It should be showing the dependency as Communities and NOT customer portal. We contacted SF support but they said this is developer issue. We are failing to understand how to resolve this dependency when its SF who is showing this as a dependency. 

​Can anyone please help how to resolve this? Any help is highly appreciated.

Regards
Kamal
Hi all, 
I'm a newby in Salesforce so I decided to start learning with the Trailhead. 
I have completed all the challanghes related to the "Getting Started with the Force.com Platform". 
This morning I started with the part 2: "Intro to Visual App Development". 

The fist challenge for Workflow Atuomation is about "Automated Process with Workflow". 
I did the challenge but I receive a failure even if It should seems to run correctly in my Develper Edition Platform. 
Tha error massage received by the check challange button is "Challenge not yet complete... here's what's wrong: Case escalation failed to assign a task to the owner."

I say that all seems to work fine because I edited e case, set up the Priority to High and: 
1) The Escaleted flag was set automatically to true as per the rule action defined
2) I receive a notification about escalation on that case (because I'm the owner of the case as per the task definition field)
3) An activity under the case was automatically created and assigne to me. 

As anyone tha same problem?
Any help would be much appreciated. 
Thank's in advance,
Alvaro. 
I have been trying to create a contact record once a user record of a specific profile has been created. I am able to save the trigger but cannot create a user record. I have posted a code below. 
trigger createContact on User (before insert) {     
List<Contact> ur = new List<Contact>();
    for (User usr: Trigger.New)
    //IF(Usr.UserRoleId == '00EK0000000KRUR'){
          ur.add (new Contact(
                     FirstName = Usr.FirstName,
                     LastName = Usr.LastName));
                  //  }   
         
   
   insert ur;
 }
  • November 19, 2014
  • Like
  • 1
I was trying to install an application into sandbox Facing Package install error
Missing Organization Feature: CustomerSuccessPortal problem

How do I fix this problem?

Can anyone help me out from this?

Find the below Screenshot of Error message.

Error
  • September 02, 2014
  • Like
  • 0
I am folloiwng the tutorial mentioned in the below URL.

https://developer.salesforce.com/mobile/getting-started/html5/#angularjs-heroku

I followed exactly as mentioned, I am able to OAuth successfully, I am able to create a contact and that gets saved, but during contact list view, I am getting the following error.

Error:
------------------------------------------------------------
Calling errorCB for forcetkClient:query

Refused to set unsafe header "User-Agent"
GET https://peaceful-gorge-3898.herokuapp.com/proxy/?_=1406084316812 400 (Bad Request)

function (){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this}

------------------------------------------------------------------------

I am getting this error at this point.

function ContactListCtrl($scope, AngularForce, $location, Contact) {
    if (!AngularForce.authenticated()) {
        return $location.path('/home');
    }

    $scope.searchTerm = '';
    $scope.working = false;

    Contact.query(function (data) {
        $scope.contacts = data.records;
        $scope.$apply();//Required coz sfdc uses jquery.ajax
    }, function (data) {
        console.log(' ~~~~~~~~~~~~~ Error : ' + data.error);
        alert('Query Error : ' + data.error);
        $scope.contacts = data.records;

    });

Did anybody encounter any such error?
Hii ,
            can i define the width of <apex:pageBlock> manually ? I am able to define the size of <apex:pageBlockTable> but not of pageBlock .
      Normally <pageBlock > take full width of page but i want to override it. so if possible then please tell me .

 Thanks
 Rishav
Hi,
I need to create a custom button in the opportunity detail page which would redirect me to the approval page with the same approve/reject button with the comments field.
Can someone help with id that needs to be passed to the approval page URL.

Thanks.
is it possible to put the Items to Approve component from Home Tab to a visualforce page? how?
  • February 21, 2014
  • Like
  • 1
Is it ok to use Salesforce case management to support your own internal users. I notice that the contacts field must stay on the page even though it is not required but it seems to be driven from an external customer/contact perspective!

Has anyone set it up for there own user support and do you have any best practices and hard road experience that you would not mind sharing?

Hi experts,
I found a Salesforce object named OpportunityContactRole by using the IDE (Eclipse) and I want to add a new trigger for this object but I got the following Error message when try to save the new created trigger:
    Save error: SObject type does not allow triggers: OpportunityContactRole
I really need to add the special processing to this object before updating, do any experts have any idea how to fix this issue?
Best regards!
Boi Hue


Message Edited by boihue on 12-09-2008 11:02 AM

Message Edited by boihue on 12-09-2008 11:02 AM
  • December 09, 2008
  • Like
  • 0
Hi,

I'm attempting to create a SOQL query (to merge data via Conga).  Specificically, I would like to retrieve records from the object "ContentVersions" as they relate to Files (ContentDocument) attached to a custom object called (Transmittal).  I am retireving them from Transmittal. I have written the following:
 
SELECT v.Title, v.FileType
FROM ContentVersion v
WHERE ContentDocumentId in
(Select j.ContentDocumentId From ContentDocumentLink j
Where j.LinkedEntityId = '{pv0}')

My query returns the following error, "Entity 'ContentDocumentLink' is not supported for semi join inner selects".

The sturcture, as I understand it is:
Transmittal
ContentDocumentLink (creates a m to m relationship between the Linked Entity (here Transmittal) and ContentDocument.
ContentDocument
Content Versions

I have reviewed the Content Object schema.

Is the query incorrect, or is it not supported?  If not what is a work-around? (Sorry I'm an amateur).

Thank for your help.
We have the enhanced notes enabled in our Salesforce lightning edition. We are attempting to import to the "ContentNote" object via the API (not the data loader). We confirm that our WSDL file contains the ContentNote object and all the fields. However we get an API "invalid object" error. We have tried specifying the object name in the API call as "ContentNote" (as it is in the WSDL) and "ContentNote__c" (as the error message suggests) without success. We cannot see the object in the object manager, or in the list of objects when managing user profile object permissions. We can add a note to the enhanced note tool fine via the lightning user interface.

We have already reviewed the following:

- https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentnote.htm
- https://help.salesforce.com/articleView?id=Consideration-for-enhanced-notes-and-using-Files&language=en_US&type=1
- https://help.salesforce.com/articleView?id=Importing-Notes-to-the-ContentNote-object-using-the-Apex-Data-Loader&language=en_US&type=1)
- https://help.salesforce.com/articleView?id=ContentNote-insert-error-Note-Can-t-Be-Saved-Because-It-Contains-HTML-Tags-Or-Unescaped-Characters-That-Are-Not-Allowed-In-A-Note&language=en_US&type=1

Any thoughts?
Hi all,

We were researching with the new enhanced notes feature prior to the Winter '17 release and I believe we saw the ability to add custom fields to the ContentNote object. But since the last release adding custom fields seems to no longer be an option.  Does anyone know why this didn't make it into Winter?

Thanks ahead of time!

Hi,

I'm having this issue when I click on "New Note" Button: The button is not working.
User-added image

<apex:relatedList list="AttachedContentNotes"/>

Any clue? 

I can add notes without using my visualforce page, using the defalut layout.

Thanks,

Pablo G.

HI,

I am just trying to get last added / updated note (Content Note) on a contract.
I tried triger on Content Note(not supported), ContractFeed (Not supported), Content Version (Parent id is not present), Feed item (Content is not present)

What is the relataionship I can use to get
1) parent id
2) title of note
3) body of note

Code tried : This returns NULL
trigger tgrGetContractNotes on FeedItem (after insert, after update) {
    for(FeedItem f : Trigger.new){
        system.debug('#Contractid#'+f.ParentId);
        system.debug('#rel#'+f.RelatedRecordId);
        ContentVersion cV = [Select ContentDocumentId from  ContentVersion where id= :f.RelatedRecordId limit 1];
        ContentNote cN = [Select TextPreview,Title from ContentNote where id =: cv.ContentDocumentId limit 1];
        system.debug('#notetitle#'+cN.Title);
        system.debug('#notebody#'+cN.TextPreview);
        ContractFeed cF = [Select title, body from ContractFeed where parentid = : f.ParentId limit 1];
        system.debug('#notebody#'+cF.title);
        system.debug('#notebody#'+cF.body);
    }
}
Thanks
Ann
 
Hi All,

When i am trying to update(Page is VF page) my record am getting error in Production saying that 'DATA NOT AVAILABLE' "The data you were trying to access could not be found.  It may be due to another user deleting the data or a system error.  If you know the data is not deleted but cannot access it, please look at our support page." Please Help me out

Thanks,
A.Jagadeesh

HI all,
This service presence status is referenced elsewhere in salesforce.com. Remove the usage and try again.

and also we we create new status option ?

Thanks,
Sudhakar.

I'm trying to find a way to change the from name of an org-wide email address to the current user who is sending the email. I need to do this when the email is being sent from the Case email action on the console feed view. I've tried a couple of different methods, my most recent is using the QuickAction.QuickActionDefaultsHandler to reference the emailMessage and try to change fromName, but had no success.

Example:
"Support" <support@example.com> should be "John Smith" <support@example.com> when John Smith is the sender.

I haven't found an answer while searching through the forums and stackoverflow, so any help you can provide is greatly appreciated.
HI ,

We have a trigger on Account which have logic to change Opportunity Owner as Account Owner.
I did disable(inactive) the  trigger.

Still I observe that if Account and Opportunity have same owner and I change Account owner then Opportunity owner get change.

This is happen only when Account and Opportunity have same owner.

Is there anybody have some idea?


Thanks,
Dhanraj

i have written a class for Case merge functionality , But the problem is when ever i call this class from trigger it shows error .... can anybody help me how can i call this class from trigger....? and this this is my class please send me how can i call this class from trigger..

 

public with sharing class casemerge{

public void mergecases(Case dupcase,Id mastercaseid){

System.debug('*************dupcase records**************'+dupcase);

//--------Duplicate all attachments

 List<Attachment> AttachmentsToBeCreated = new List<Attachment>();  

for (Attachment a : [SELECT Name, IsPrivate, Description, Body FROM Attachment WHERE ParentId = :dupCase.Id AND IsDeleted=false]){

 AttachmentsToBeCreated.add(new Attachment(ParentId = masterCaseId,Name = a.Name,IsPrivate = a.IsPrivate,Description = a.Description,Body = a.Body));        

}        

//-------Duplicate all comments

 List<CaseComment> CommentsToBeCreated = new List<CaseComment>();

 for (CaseComment cc : [SELECT IsPublished, CreatedDate, CommentBody FROM CaseComment WHERE ParentId = :dupCase.Id AND IsDeleted=false]) {

 CommentsToBeCreated.add(new CaseComment(ParentId = masterCaseId,IsPublished = cc.IsPublished,CommentBody = 'This case comment was originally created on ' + cc.CreatedDate +' and was merged into this case.\r\r' + cc.CommentBody));        

}

 if (!CommentsToBeCreated.IsEmpty())

 insert CommentsToBeCreated;

//-------Change the whatid for all tasks

List<Task> allTasks = [SELECT Id, WhatId FROM Task WHERE WhatId = :dupCase.Id AND IsDeleted=false];

if (!allTasks.isEmpty()) {    

for (integer i = 0; i < allTasks.size(); i++)    

allTasks[i].WhatId = masterCaseId;    

update allTasks;        

}

//-----Change the whatid for all Events

List<Event> allEvents = [SELECT Id, WhatId FROM Event WHERE WhatId = :dupCase.Id AND IsDeleted=false];

if (!allEvents.isEmpty()) {

for (integer i = 0; i < allEvents.size(); i++)

allEvents[i].WhatId = masterCaseId;            

update allEvents;        

}      

// duplicate all the attachments (of the case and related emails)

if (!AttachmentsToBeCreated.IsEmpty())

insert AttachmentsToBeCreated;  

// delete the original case and all it's related items

delete dupCase;

}

}

Any body help me how can i merge Case object records using trigger and apex class .. please send me example code...

Can anybody help me i am merging cases, those are not merging. If i am going to merg the case records it shows an error can anybody help to rectify this Error the Error is" Error: Compile Error: Specified type SOBJECT:Case cannot be merged at line 9 column 1 "

and this is my code...........................................

 

Case masterCase = [SELECT Id, casenumber,Accountid,Contactid,origin FROM Case WHERE Accountid = '0019000000jiDIX' AND Contactid = '0039000000iOKkH' AND origin = 'Phone' LIMIT 1]; System.debug('************master*****************'+mastercase); Case mergeCase = [SELECT Id, casenumber,Accountid,Contactid,origin FROM Case WHERE Accountid = '0019000000jiDIX' AND Contactid = '0039000000iOKkH' AND origin = 'Email' LIMIT 1]; System.debug('************merge*****************'+mergecase);

try {    

merge masterCase mergeCase;

}

catch (DmlException e) {    

// Process exception here

}

Can any body help me how can i merge Case object records using trigger... please send me code..

Hi All,

 

Iam new to this OCR(Optical Character recognition). Right now we have a requirement to integrate OCR with Salesforce. Is there any APP out there which can do this?

 

Thanks

Hi - I'm working in Professional Edition and am having a issue with Opportunity Owners getting changed to match the Account Owner.  I work in a multi-channel environment where more than one owner works on an Account along with multiple opportunity owners.  Is there a way to be able to change the Account Owner field without disrupting the Opportunity Owners?

Hi,

 

I'm trying to encode text a user would input in an inputtext field, so that it doesn't allow malicious characters.

 

This is the input field
<input type="text" id="custAttType" />

In my script tag, I use this:
var custType = $('#custAttType').val();             
var custTypeValue = {!JSINHTMLENCODE(custType)};

 

 

However I get this error:


Error: Unknown property 'MyTypes__cStandardController.custType'

 

I tried different ways, but with the same error:

var custTypeValue = "{!JSINHTMLENCODE(custType)}";

var custTypeValue = {!JSINHTMLENCODE(custType+'')};

 

Am I using the function right?

 

Thanks in advance

kpr

  • November 03, 2011
  • Like
  • 1

Hi,

 

I have a custom controller called: MyController, I did 

Error: Unknown constructor 'MyController.MyController(ApexPages.StandardSetController controller)'.

 

On my controller code I have the following implementation of a simple constructor:

 

public class MyController {
    public Plan_Table__c table;
    public List <Table_Account__c> table_acc;
    public MyController() {
        table = null;
        table_acc = null;
    }

 

 

// some get and set APIs ....

...

...

...

}

 

Why do I keep getting this error when saving my tag file:

<apex:page standardStylesheets="false" sidebar="false" StandardController="Table_Account__c" Extensions="MyController" tabStyle="Account" recordSetVar="acc">

 

...

...

...

 

 

Thanks,

Guy

I have the following "Summary" Visualforce Page selectively showing fields and related lists from Opportunity.  I want the user to be able to add a new note by clicking a "New" button from this screen but I have not been able to find the syntax for an Opportunity Note.

 

Relevant PageBlock section and the code in Red that throws the error:

 

Can anyone assist with the correct code to add a new Opportunity Note from this VisualForce page?

 

<apex:pageBlock title="Notes"> <apex:pageBlockButtons > <apex:commandButton action="/002/e?parentid={!opportunity.id}" value="New Note"/>

</apex:pageBlockButtons> <apex:pageBlockTable value="{!Opportunity.Notes}" var="note"> <apex:column width="30px"> <apex:facet name="header"><strong>Link</strong></apex:facet> <div> <a href="/{!note.id}">Link</a> </div> </apex:column> <apex:column value="{!note.createddate}" width="120px"/> <apex:column value="{!note.createdbyid}" width="120px"/> <apex:column value="{!note.body}" /> </apex:pageBlockTable> </apex:pageBlock>

 

 

 

 

Entire Page Code:

<apex:page standardController="Opportunity" standardStylesheets="true" showHeader="false" sidebar="false" tabStyle="Opportunity"> <table width="98%" height="50%" border="0" cellpadding="0" cellspacing="0"> </table> <apex:form > <apex:pageBlock title="Opportunity Strategy - Details"> <apex:pageBlockSection title="Opportunity Information" columns="3"> <apex:pageBlockSectionItem > <apex:outputLabel value="Opportunity" for="opportunity"/> <a href="/{!opportunity.Id}">{!opportunity.Name }</a> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width: 240px"> <apex:outputLabel value="Account" for="account"/> <a href="/{!Opportunity.Account.id}">{!Opportunity.Account.Name}</a> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="State" for="state"/> <apex:outputField id="address" value="{!Opportunity.Account.BillingState}" /> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Account Type" for="industry"/> <apex:outputField id="industry" value="{!Opportunity.Account.Type}" /> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width: 240px"> <apex:outputLabel value="Stage" for="stage"/> <apex:outputField id="stage" value="{!Opportunity.Stagename}" style="{!if(Opportunity.StageName='Red','background-color:#FE2E2E', if(Opportunity.StageName='Green','background-color:#00FF80',if(Opportunity.stagename='Yellow','background-color:#F3F781','color:black')))};width: 80px; text-align: right;"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Amount" for="amount"/> <apex:outputField id="amount" value="{!Opportunity.Amount}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Owner" for="owner"/> <apex:outputField id="owner" value="{!Opportunity.OwnerId}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width: 240px"> <apex:outputLabel value="Type" for="type"/> <apex:outputField id="type" value="{!Opportunity.Account.Account_Type__c}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Close Date" for="closedate"/> <apex:outputField id="closedate" value="{!Opportunity.CloseDate}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> <apex:pageBlockSection title="Description" columns="1"> <apex:pageBlockSectionItem > <apex:outputLabel value="Description" for="description"/> <apex:outputField id="description" value="{!Opportunity.Description}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> <apex:pageBlockSection title="Goals and Strategies" columns="2"> <apex:pageBlockSectionItem > <apex:outputLabel value="Next Steps" for="next"/> <apex:outputField id="next" value="{!Opportunity.NextStep}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Last Activity Date" for="lastactivity"/> <apex:outputField id="lastactivity" value="{!Opportunity.lastactivitydate}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Goal/Objective" for="goal"/> <apex:outputField id="goal" value="{!Opportunity.Goal_Objective__c}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="ODM Strategy" for="odm"/> <apex:outputField id="odm" value="{!Opportunity.ODM_Strategy__c}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock title="Notes"> <apex:pageBlockButtons > <apex:commandButton action="/002/e?parentid={!opportunity.id}" value="New Note"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!Opportunity.Notes}" var="note"> <apex:column width="30px"> <apex:facet name="header"><strong>Link</strong></apex:facet> <div> <a href="/{!note.id}">Link</a> </div> </apex:column> <apex:column value="{!note.createddate}" width="120px"/> <apex:column value="{!note.createdbyid}" width="120px"/> <apex:column value="{!note.body}" /> </apex:pageBlockTable> </apex:pageBlock> <apex:pageBlock title="Pending Activity Summary"> <apex:pageBlockTable value="{!Opportunity.OpenActivities}" var="item"> <apex:column width="30px"> <apex:facet name="header"><strong>Link</strong></apex:facet> <div> <a href="/{!item.id}">Link</a> </div> </apex:column> <apex:column value="{!item.summary__c}"/> <apex:column value="{!item.subject}"/> <apex:column value="{!item.status}"/> <apex:column value="{!item.istask}"/> <apex:column value="{!item.activitydate}"/> <apex:column value="{!item.whoid}"/> <apex:column value="{!item.whatid}"/> </apex:pageBlockTable> </apex:pageBlock> <apex:pageBlock title="Meeting/Events"> <apex:pageBlockTable value="{!Opportunity.Events}" var="item"> <apex:column width="30px"> <apex:facet name="header"><strong>Link</strong></apex:facet> <div> <a href="/{!item.id}">Link</a> </div> </apex:column> <apex:column value="{!item.summary__c}"/> <apex:column value="{!item.subject}"/> <apex:column value="{!item.activitydate}"/> <apex:column value="{!item.whatid}"/> </apex:pageBlockTable> </apex:pageBlock> <apex:pageBlock title="Closed Activity Summary"> <apex:pageBlockTable value="{!Opportunity.Activityhistories}" var="item"> <apex:column width="30px"> <apex:facet name="header"><strong>Link</strong></apex:facet> <div> <a href="/{!item.id}">Link</a> </div> </apex:column> <apex:column value="{!item.summary__c}"/> <apex:column value="{!item.subject}"/> <apex:column value="{!item.status}"/> <apex:column value="{!item.activitydate}"/> <apex:column value="{!item.whoid}"/> </apex:pageBlockTable> </apex:pageBlock> <apex:pageBlock title="Contact and Roles"> <apex:pageBlockTable value="{!Opportunity.OpportunityContactRoles}" var="item"> <apex:column value="{!item.role}" width="100px"/> <apex:column value="{!item.Contactid}"width="150px"/> <apex:column value="{!item.Contact.Account.name}" width="300px"/> <apex:column value="{!item.Contact.Title}" width="150px"/> <apex:column value="{!item.Contact.email}"width="150px"/> <apex:column value="{!item.Contact.phone}"width="150px"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>

 

I have an application that stores data related to a lead or contact. I need the data to stay with the Lead when it is converted. To do this I have created a field on the Contact called Converted Lead ID, which I want to populate with the ID of the lead that the contact was converted from.

 

Since I can't map standard lead fields to custom contact fields, I created a formula field called Lead ID, and set it equal to the Lead ID.

 

Now I mapped the formula field to the Converted Lead ID field and tested it, and it all worked great. 

 

Then I found out a problem. I added these two fields to our managed package, and installed it in another org. Since package installation does not support field mapping, I went in to the Settings page to map the Lead ID to the Converted Contact ID. However, it gave me an error when I tried to do it saying that the Lead ID formula field length of 3900 was too long to map to my 18 character Converted Lead ID field.

 

Salesforce support says that can't help me because it's "Custom Code". Any suggestions?