• jyoti
  • 10 Points
  • Member since 2007

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
  • 40



I'm stumped as to why the play attribute is not being recognized in the apex:flash tag.  I have uploaded the static resource as public, but when my Sites page loads, I have to right-click and select Play to see the content.


<apex:page sidebar="false" showHeader="false" title="About Me" cache="false">
    <apex:includeScript value="{!URLFOR($Resource.AboutMe, '/swfobject.js')}"/>
    <apex:flash src="{!URLFOR($Resource.AboutMe, '/module_001-sub_module_001.swf')}" width="100%" height="100%" play="true"/>

 Is there a setting that might be interfering with my browsers, IE7 and Chrome?


I have a .html page that appears to automatically play the Flash video but am unable to find the right tag to reference it in the VisualForce page.


Thanks in advance

  • February 24, 2012
  • Like
  • 0

We have a custom button on the Account page that calls a series of VisualForce pages ("Wizard") which currently opens in a new window.  Since the content on each of the pages of the "Wizard" is very limited (not more than half a page), we were hoping to somehow have the window pop up the way a multi-select picklist does in Salesforce using in-line editing.  That is, when you double click on a multi-select field, a new window pops up, the background goes gray and you must select values and hit Save or Cancel in order to proceed with any other actions on the record.

Is it possible to emulate this functionality?

  • July 07, 2008
  • Like
  • 0
We are retrieving Account Name which often has the "&" symbol in the name such as M & M Candy.  Because "&" also appears in the URLFOR to connect the URL string with the variables, anything after the "&" symbol in the name is truncated so that M & M Candy only appears as M.
Is there a function that can check for special characters (e.g. &) in the variables that are passed to a URLFOR?

var newURL = "{!URLFOR($Action.EMS_ORDER_FORM__c.New, null, [retURL=URLFOR($Action.Case.View, Case.Id)], true)}" + "&00N70000001wxOY="+caseRetrieveResults[0].Account.SE_NO_FORM__c +"&CF00N70000001wxOJ_lkid="+caseRetrieveResults[0].Id+"&00N70000001wxOC="+caseRetrieveResults[0].Account.ADDR_LN_1__c+"&00N70000001wxOD="+caseRetrieveResults[0].Account.ADDR_LN_2__c+"&00N70000001wxOK="+caseRetrieveResults[0].Account.CITY__c+"&00N70000001wxOm="+caseRetrieveResults[0].Account.STATE_PROVINCE__c+"&00N70000001wxOg="+caseRetrieveResults[0].Account.Account_Phone__c+"&00N70000001wxOS="+caseRetrieveResults[0].Account.COUNTRY_FORM__c+"&00N70000001wxOr="+caseRetrieveResults[0].Account.ZIP_POSTAL_CD__c+"&CF00N70000001wxOJ="+caseRetrieveResults[0].CaseNumber+"&00N70000001wxOZ="+caseRetrieveResults[0].PSD_ACTS_CALLER_NM__c+"&00N70000001wxOh="+caseRetrieveResults[0].PRD__c+"&00N70000001wxOn="+caseRetrieveResults[0].Account.FD_TAX_ID__c+"&00N70000001wxOE="+caseRetrieveResults[0].Owner.Email+"&00N70000001wxOU="+caseRetrieveResults[0].Account.DBA__c+"&00N70000001wxOX="+caseRetrieveResults[0].Account.Name;

  • June 19, 2008
  • Like
  • 0
Has anyone noticed any performance impacts when using Apex?  We do about 30K Account upserts nightly and a 6MM load monthly.  Typically the throughput via Data Loader on the monthly load is about 120K/hour.
Recently, we developed a very involved Account trigger on before insert, before update as well as an after update.  This caused a severe performance degradation to about 38K/hour.  Disabling the after update caused it to increase again to about 95K/hour.  We then implemented a time-based workflow on the Account object in order to fulfill the requirement that was to be met by the after update trigger.  With the before insert/before update trigger and the workflow, we are seeing an throughput of about 67K.
Any thoughts or similar experiences?
  • March 17, 2008
  • Like
  • 0
I have created a custom screen with Accounts owned by a specific user using an S-Control with HTML to build the page .  In this screen, someone would reassign the Account records to a new user by selecting a user.
Question:  Is there a way for me to query the User table to automatically populate the User dropdown?  And then reference it (the User's Id) in the HTML to populate the dropdown?
The following is the S-Control function to pull the users and the HTML where I want to pull each User into my option value.

function getUserList()


var userList = sforce.connection.query("select Id, Name from User limit 10");

var userListRecords = userList.getArray("records");



<form action="">

<select name="user">

<option value="getUserList()"></option>



  • February 08, 2008
  • Like
  • 0
The following is a trigger that saves correctly to Sandbox.  In it, I want to set the PP_CLIENT_DIR_VP__c to a specific value after an update or creation of an Account record.

Trigger UpdateTMID on Account (after insert, after update)


List<Account> acctList = new List<Account>();

for (Account acct:Trigger.new)


Integer i = 1;

Account a = new Account(Id = acct.Id);

system.debug('This is the number of times it is has gone through the loop' +i);

acct.PP_CLIENT_DIR_VP__c = 'JC13';




// update the Accounts

update acctList;



When I attempt to update an Account, however, I receive an error System.Exception: Record is read-only.  The curious thing is 1) I own the Account record and 2) I have written a similar trigger on Contract without this issue.

Additionally, I am setting Account a = new Account(Id = acct.Id); even though I don't intend to create a new Account but rather update the Account that has triggered.  Is this correct?  Incidentally, when I comment out this line, I either get the read-only error or the for loops more than once for one record update.

Any thoughts?

  • January 10, 2008
  • Like
  • 0
I'm writing my first Apex trigger and am running into an error which I am sure is simple to resolve but I can't seem to figure out.
Problem: I need to update a field (checkbox) on a parent (Account) record called PFlg when the child's Contract record field, CFlg, is checked.
My Solution: Since workflow field update doesn't allow multiple objects, I thought to use an Apex trigger.

trigger Flag on Contract (after update) {

sObject c = new Contract();
Contract d = (Contract)c;

if (trigger.new.CFlg__c.equals(TRUE) )
   sObject s = new Account();
   Account f = (Account)s;
   f.PFlg__c = TRUE;



This results in an error:

Error: Compile Error: Initial term of field expression must be a concrete SObject: LIST:SOBJECT:Contract at line 6 column 5
<SCRIPT type=text/javascript>function initSelectionInEditor() { setSelectionInEditor('Body', 118, 118) }setContentWindow(window);initSelectionInEditor();</SCRIPT>
Then I changed it to:
trigger UpdateDocExpressFlag on Contract (after update) {
sObject c = new Contract();
Contract d = (Contract)c;
for (Contract ddd:Trigger.new)

if (ddd.CFlg__c(TRUE) )
   sObject s = new Account();
   Account f = (Account)s;
   f.PFlg__c = TRUE;
which resulted in the following error:
Compile Error: Method does not exist or incorrect signature: [SOBJECT:Contract].CFlg__c(Boolean) at line 8 column 5
Any thoughts as to what I'm missing?

Message Edited by jyoti on 12-31-2007 07:34 AM
  • December 31, 2008
  • Like
  • 0
I am working on Trailhead module: Test your Process. I followed all the steps in creating Process Builder through Trailhead and I am getting below error:
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Account number must be 8 characters long: []
Can one of you help or let me know, what I am doing wrong.


I have written one after update trigger on Opportunity standard object, which will update one field in Contact Object. But this trigger is getting fired twice.


Any idea on why the trigger is getting fired twice and how to resolve the problem?


Thanks in Advance,


  • March 23, 2009
  • Like
  • 0
I want to validate the form (which has 4 sets of radio buttons) to ensure all the radio buttons are selected.
if each of the 4 has  a radio button selected, then It moves to the next page as expected but gives an alert which it should not.
if all are not selected, it stays on the same page but the page gets refreshed, so we lose the previously answere questions.
function checkSelectedApprovers(inputForm)
 var processForm = true;
 for(var inputFormFieldsIndex = 0; inputFormFieldsIndex < inputForm.elements.length; inputFormFieldsIndex++)
   window.alert("Please select an Approver from each group!");
   processForm = false;
   return processForm;
 return processForm;
In the page

<apex:commandButton value="Continue" action="{!nextPage}" onclick="return checkSelectedApprovers(this.form)"/>

<apex:commandButton value="Continue" action="{!nextPage}"/>



<script language="Javascript" type="text/javascript" src="{!$Resource.SelectApproverValidation2}">



I have a apex code which runs fine when the user is a sysadmin.
But it errors with null pointer when the user is another profile.

How do I debug this ? Thanks
hi All,

I don't really understand the Test coverages. Could you please help me with this?

When I modify a trigger that already exists in production I change it and modify it in sandbox but after I see that it is working correctly I modify it directly in production through the Force.com project. I could do more test coverage in production to see if it is also working correctly in production but the trigger is already deplyed in production because I changed it manually using Eclipse.

I would like to know if it is damangerous and if there is another way to do it more secure.


I have created a controller for visual force page as follows:

public class ControllerLicenseTypeTest {

   public Profile getProfile(){

     Profile p = [Select Id, LicenseType from Profile  Limit 1];

     return p;



In above method I am trying to fetch the license type of a user profile. But when execute this code I found this error message :

Error: Compile Error: No such column 'LicenseType' on entity 'Profile'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 3 column 15

Where as this query '
Select Id, LicenseType from Profile  Limit 1' return the record in sforce Explorer.

Please fix this problem.
Looking for quick response.

Hi, can someone tell me what happens when a trigger fails?  I have a requirement to report the failure to my users.

I have a custom object, Employee, and on the New Employee entry tab I would like it to auto populate a field when the user selects from a picklist.  For example, if the user selects an employee type of 'Programmer' from the picklist I would like the Salary field to auto-populate with 50,000.  Salary need to be a real field too, so that the user can replace 50,000 with some other figure.  This doesn't seem to be possible with the standard Salesforce setup (please correct me if I'm wrong), so I'm wondering if it's possible to do it with an S-control?  If so does anyone have an S-control which does this that I can look at?

If I have a Trigger on Acccount I can make:
Map<Id, Account>  m = Trigger.new;

and than I can select all Opportunities of those Accounts like that:
List<Opportunity> = [select o.Id from Opportunity where o.AccountId IN : m.keySet()];

But what do I do if I can't use the id of the trigger object, ex.

I have a trigger on Contracts and I want to select all the Accounts, i need something like:
Map<Id, Contract>  s = Trigger.new;
[select a.Id from Account c where a.Id IN :s.values().AccountId]
but this doesn't work, can someone help?
  • April 02, 2008
  • Like
  • 0
I have a csv file that Data Loader would handle nicely except that one of the columns in the CSV is called salesperson1 and it has values that are names.  I would like to map this value into Contact.Name but you can't do that in Data Loader.

What I need is to go into sfdc and find out the contact id's that match the names in my csv file and then use that to populate the contact field when I migrate the data from csv to salesforce.

What is the best way to do this?  I'm thinking Talend but I haven't found an easy solution there either.

I've created an html s-control and assigned it to a custom web tab with an associated icon and color.

I've updated it using the outlines in this guide for setting the styles so that it looks like a native Salesforce page. Brilliant.

Specifically it shows that you use <BODY class="xxx"> to set the overall color scheme and icon for the page.

However, I want to use the color and icon from my custom web tab when displaying the s-control. Seems like it should be possible. This thread shows how to get the class name for Salesforce's built-in styles:

But is there some way to know what the class name is for the style defined in my custom web tab? Seems like there should be a way. But how?

Hi All,
We have a requirement where i need to generate a report showing the details of all the opportunities,activities,contacts,contracts linked to an account in one page. in sfdc, i noticed that at one time, i can generate report on two objects. request you to please provide us on some pointers on this. This is one of the critical client req..
is there a way to design our own reports in sfdc..
Thanks in advance.
I read that you can only create a trigger in the sandbox.  Is this correct?  If so, how do you deploy the trigger to the production instance once the trigger has been created?  Does it automatically get added to the production environment or do you have to do something to deploy the trigger?
Are triggers available with the Professional Edition or only with the Enterprise and Unlimited Editions?
Thanks for any help.
I have 2 questions:

1. I have address1, address2, and address3 fields in my csv that are supposed to go to Billing Street field in sfdc. Do I have to merge those three fields into one in my csv before using data loader?

2. I have a field called salesperson which is supposed to map to Account Owner on account object, but the field is OwnerId, and I don't have the Id of the person named in salesperson. how do I obtain the Contact Id of the person in question so I can put in the csv instead of the person's name?

Thanks for any help.

I am trying to get one custom text field filled with a text depending if the Comment field in the task is filled or is empty. The syntax should be a straight forward one (I think) : if (Comments <> "" , "Full" , "Empty").
The problem I am having is that I keep getting : Error: Field Comments does not exist. Check spelling.
But where ever I search I cant seem to find the right name of the field name of Comments.
Is there anyone who knows :
1. if the syntax I use is the right one
2. where can I find the proper field names I should use ?
Thanks !