• Gennadiy
  • NEWBIE
  • 15 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 32
    Replies
We have encountered a strange issue in a customer Sandbox. A VF homepage component generates relative URLs, but in other orgs it generates absolute URLs. Is this an internal defect, or is it a configuration that we don’t know about?

In the sandbox is a Visualforce homepage component based on a simple custom VF page. This component is added to the left sidebar in classic SF UI. It works fine on standard pages and on other custom VF pages.
BUT when we try to open a VF page from any AppExchange package, the sidebar component fails and we see the “URL No Longer Exists” error inside it. 
We analyzed the HTML-code in a browser and found that it fails because Salesforce does not use the correct URL for an iframe which is generated for the home page component.
Pages from AppExchange packages are based on a specific domain name (unique for every package). Example of a page from the "mea" package:
https://mea.cs52.visual.force.com/apex/MassEditAllActivities
In the defective sandbox, Salesforce generates the following iframe for a sidebar component (NOTE that it uses a relative URL):
<iframe frameborder="0" id="contentPane"
   onload="initContentFrame('/apex/MyCustomPage, true, false , https://cs52.salesforce.com' );"
   src="/blank.html" style="width: 100%; height: 100%">
</iframe>
As a result, a browser tries to open the following URL in the iframe:
https://mea.cs52.visual.force.com/apex/MyCustomPage
Since the custom page is not a part of the MEA package this URL does not work.

In all other orgs where we tried to reproduce this issue, Salesforce generates absolute URLs for the same iframes and they work good:
<iframe frameborder="0" id="contentPane"
   onload="initContentFrame('https://na14.visual.force.com/apex/MyCustomPage, true, false , 'https://na14.salesforce.com' );"
   src="/blank.html" style="width: 100%; height: 100%">
</iframe>

Other AppExchange packages cause this same issue in this sandbox, but work correctly in other orgs. 
Why would Salesforce generate incorrect URLs only in this sandbox?
Hi. In Salesforce we can create a Visualforce homepage component which is based on a custom VF page. This component is displayed in IFRAME in the sidebar. We found that SF uses 2 diffirent types of URLs for these iframes in different orgs:
  • in the most of cases it generates absolute URLs:
<iframe
    frameborder="0" id="contentPane" name="contentPane"
    onload="initContentFrame('https://gs-test.na14.visual.force.com/apex/MyCustomPage?core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https%3A%2F%2Fna14.salesforce.com%2Fapex%2Fsharem__Folderize&amp;inline=1&amp;autoMapValues=1&amp;sdfcIFrameOrigin=https%3A%2F%2Fna14.salesforce.com%2Fapex%2Fsharem__Folderize&amp;core.apexpages.devmode.url=1', true, false , 'https://na14.salesforce.com' );"
    src="/blank.html" style="width: 100%; height: 100%" title="Content Pane"
</iframe>
  • in few orgs it generates relative URLs:
<iframe
    frameborder="0" id="contentPane" name="contentPane"
    onload="initContentFrame('/apex/MyCustomPage?core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https%3A%2F%2Fcs52.salesforce.com%2Fhome%2Fhome.jsp&amp;inline=1&amp;autoMapValues=1&amp;sdfcIFrameOrigin=https%3A%2F%2Fcs52.salesforce.com%2Fhome%2Fhome.jsp&amp;core.apexpages.devmode.url=1', true, false , 'https://cs52.salesforce.com' );"
    src="/blank.html" style="width: 100%; height: 100%" title="Content Pane">
</iframe>

The 2nd approach does not work if we open any Visualforce page from an AppExchange package, because such pages are based on a specific domain names (they are unique for an every package) which differ from the main domain name that is used for own custom pages. Example of a page from the "mea" package:
https://mea.cs52.visual.force.com/apex/MassEditAllActivities

Since an own page is not a part of this package, a relative URL does not work, because it's equal to the following absolute URL:
https://mea.cs52.visual.force.com/apex/MyCustomPage


So, does anybody know what SF configurations may affect this? Why does SF use absolute URLs in the most of orgs and relative URLs sometimes in several orgs? I tried to reproduce this issue in our dev org, but didn't succeed.
Hi All.

Could you please help us to find a solution for our issue?

We need to set a custom URL for our SF Community (not a Force.com site). To do that we performed the following steps:
- registered a custom domain (www.mycompany.com) using the GoDaddy service and added a necessary CNAME there to point this URL to our SF community.
- added a domain for this URL in Salesforce.
- created a Custom URL in Salesforce to point this domain to the community.

Now, if we enter a custom URL in a browser (www.mycompany.com), then it correctly redirects us to the Salesforce community. And it's exactly what we want, except one thing: in address bar of a browser we still see old URL: XXX.force.com.

So, Is it possible to configure this custom URL so that we could see "www.mycompany.com" in an address bar? What should we pay attention for to implement this behavior?

Thank you. Gennadiy.

p.s. One of our assumptions is that we should do something more with CA-certificate and SSL-certificate. If anyone knows more whether they affect on the described problem or not, please push us in a right direction.
Hi,

We are developing and supporting a managed package in AppExchange, which works with ContentVersion objects. Last 3 weeks we started to get strange notifications from the client organizations (at the same time it's interesting to note that we didn't get any complaints from them). And we've never got such notifications previously.

The issue looks like a compilation error in the codebase. We don't believe that it's possible because of our implementation, because our package is managed and, of course,it is compiled every time when we upload a new version. Also our current codebase in the development instance is still compilable and we didn't reproduce any compilation errors in test environments where we installed the same version as our customers have.

Moreover, there is a strange first line in the stack trace, which is included in the notification:
System.test: line 32, column 17: Invalid type: Component.Apex.Page
It references to the System class, not to one of our classes. This fact makes us think that the problem is somehow related with the system changes.

We know that last 3 weeks Salesforce was delivering a new Winter 16 Release, and, maybe, the problem is somehow related with this fact, but we are not sure.

Here is full text of the typical notification:
Apex script unhandled trigger exception by user/organization: UserId/OrgId

TriggerForContentDocuments: execution of AfterUpdate

caused by: line 11, column 3: trigger body is invalid and failed recompilation: Dependent class is invalid and needs recompilation:
(package_name)
(package_name)
(package_name)
(package_name)
package_name.OneOfOurClasses: line 18, column 8: Dependent class is invalid and needs recompilation:
System.test: line 32, column 17: Invalid type: Component.Apex.Page

Maybe, someone of you met similar problems before or have any ideas what this issue may mean. Any help is appreciated. Thank you.
Hello.

I'm trying to understand what happened with daily email limit on Developer Edition. About a year ago our team worked on the specific feature which generates hundreds of emails and sends them to internal SF users using SingleEmailMessage and its setTargetObjectId method. I remember that everything worked perfectly on Developer Edition, Sandbox and PRD (we even were able to send some thousands of emails without any problems and limits).

As of now, we're working on another feature which should generate and send many emails too. But we found that SF can't send hundreds of emails now on our Developer Edition.

I've tried to analyze the problem, but didn't find the reason:
- there are no any exceptions in logs;
- when I look at a log it says: "EMAIL_QUEUE" (email is queued);
- I even tried to reserve email capacity using the code like this Messaging.reserveSingleEmailCapacity(numberOfEmails);, but didn't get any exceptions (limit is still free).
Everything works correctly, but emails are not sent to SF users.

So, my questions:
1) is there a specific limit for emails on Developer Edition? If it's true, then what is the daily limit?
2) did I miss something in the SF documentation? I considered this description:
If you use SingleEmailMessage to email your organization’s internal users, specifying the user’s ID in setTargetObjectId means the email doesn’t count toward the daily limit. However, specifying internal users’ email addresseses in setToAddresses means the email does count toward the limit.


I'm providing a test code for those who want to check it on his Developer Edition:
//1) generate and send emails
List<Messaging.SingleEmailMessage> messages = new List<Messaging.SingleEmailMessage>();
final Integer NUMBER_OF_EMAILS = 300;
for (Integer index = 0; index < NUMBER_OF_EMAILS; index++)
{
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
    email.setTargetObjectId(UserInfo.getUserId());
    email.setSubject('Test : ' + index);
    email.setPlainTextBody('test');
    email.saveAsActivity = false;
    messages.add(email);
}
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages, false);

//2) print the results
for (Messaging.SendEmailResult result : results)
{
    System.debug(result);
}
Hi, colleagues.

I'm trying to create a VF-page which can be opened as an Excel file in Microsoft Excel 2011 for Mac. I didn't meet any problems with Excel 2007, 2010, 2013 which are based on Windows platform, but an image is not displayed on Mac (I can see its border only and an error message inside).
Let me provide simple test code of my VisualForce page:

<apex:page standardStylesheets="false" sidebar="false"  showHeader="false" showChat="false" contentType="application/vnd.ms-excel#Test_ExcelReport.xls">
    <table>
        <tr>
            <td>
                <apex:image url="http://icons.iconarchive.com/icons/benjigarner/softdimension/256/Excel-icon.png"/>
            </td>
            <td>
                <img src="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/>
            </td>
        </tr>
    </table>
</apex:page>



Does anybody know how we can correctly insert images in Excel-files so that they are displayed in Microsoft Excel 2011 for Mac?
Hi, Guys.

I'm trying to create a VF-page which is opened as Excel file. I didn't meet any problems with text, tables, CSS-styles, but I can't insert images into the document. Images are not displayed (I can see their borders only) in Excel editor.
Let me provide simple test code of my VisualForce page:

<apex:page controller="TEST_ExcelReportController" standardStylesheets="false" sidebar="false"
  showHeader="false" showChat="false" contentType="application/vnd.ms-excel#Test_ExcelReport.xls">
    <table>
        <tr>
            <td>
                <apex:image url="http://icons.iconarchive.com/icons/benjigarner/softdimension/256/Excel-icon.png"/>
            </td>
            <td>
                <img src="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/>
            </td>
        </tr>
    </table>
</apex:page>


Does anybody know how we can correctly insert images in Excel-files?

Hi, everybody.

 

I'm using Eclipse Java EE IDE for Web Developers (Version: Indigo Service Release 1, Build id: 20110916-0149). To write APEX code I've installed 'Force.com IDE' plugin (version 27.0.0.201302151147).

 

So, sometimes the code assistant doesn't work and it looks like it's because of internal bugs of the plugin.

 

Let me provide the example (please do no pay any attention to the logic):

 

public with sharing class H_C_TestClass
{
	public void method1()
	{
		String testString = 'Hello';
		Integer a = 5;
		Integer b = 10; 
		if (a < b)
		{
			//I want to open code assistant here and see my variables: testString, a and b
			//But I can't see them in the list.
		}
	}
	
	public void method2()
	{
		String testString = 'Hello';
		Integer a = 5;
		Integer b = 10;
		if (a > b)
		{
			//some code
		}
	}
}

 

I want to set a cursor inside the 'if' section of the 1st method, press on CTRL+space and see my variables in the list. But they are not in the list and I have to write them manually (it's really annoyed).
But if I change a condition in the 2nd method from 'a > b' to 'a < b' or to 'a == b' then the code assistant will work as it's expected.

So, has anybody met something similar? Can it be solved? If it is the plugin's bug then how I can notify creators about this problem?

Hi All.

Could you please help us to find a solution for our issue?

We need to set a custom URL for our SF Community (not a Force.com site). To do that we performed the following steps:
- registered a custom domain (www.mycompany.com) using the GoDaddy service and added a necessary CNAME there to point this URL to our SF community.
- added a domain for this URL in Salesforce.
- created a Custom URL in Salesforce to point this domain to the community.

Now, if we enter a custom URL in a browser (www.mycompany.com), then it correctly redirects us to the Salesforce community. And it's exactly what we want, except one thing: in address bar of a browser we still see old URL: XXX.force.com.

So, Is it possible to configure this custom URL so that we could see "www.mycompany.com" in an address bar? What should we pay attention for to implement this behavior?

Thank you. Gennadiy.

p.s. One of our assumptions is that we should do something more with CA-certificate and SSL-certificate. If anyone knows more whether they affect on the described problem or not, please push us in a right direction.
Hi, colleagues.

I'm trying to create a VF-page which can be opened as an Excel file in Microsoft Excel 2011 for Mac. I didn't meet any problems with Excel 2007, 2010, 2013 which are based on Windows platform, but an image is not displayed on Mac (I can see its border only and an error message inside).
Let me provide simple test code of my VisualForce page:

<apex:page standardStylesheets="false" sidebar="false"  showHeader="false" showChat="false" contentType="application/vnd.ms-excel#Test_ExcelReport.xls">
    <table>
        <tr>
            <td>
                <apex:image url="http://icons.iconarchive.com/icons/benjigarner/softdimension/256/Excel-icon.png"/>
            </td>
            <td>
                <img src="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/>
            </td>
        </tr>
    </table>
</apex:page>



Does anybody know how we can correctly insert images in Excel-files so that they are displayed in Microsoft Excel 2011 for Mac?
We have encountered a strange issue in a customer Sandbox. A VF homepage component generates relative URLs, but in other orgs it generates absolute URLs. Is this an internal defect, or is it a configuration that we don’t know about?

In the sandbox is a Visualforce homepage component based on a simple custom VF page. This component is added to the left sidebar in classic SF UI. It works fine on standard pages and on other custom VF pages.
BUT when we try to open a VF page from any AppExchange package, the sidebar component fails and we see the “URL No Longer Exists” error inside it. 
We analyzed the HTML-code in a browser and found that it fails because Salesforce does not use the correct URL for an iframe which is generated for the home page component.
Pages from AppExchange packages are based on a specific domain name (unique for every package). Example of a page from the "mea" package:
https://mea.cs52.visual.force.com/apex/MassEditAllActivities
In the defective sandbox, Salesforce generates the following iframe for a sidebar component (NOTE that it uses a relative URL):
<iframe frameborder="0" id="contentPane"
   onload="initContentFrame('/apex/MyCustomPage, true, false , https://cs52.salesforce.com' );"
   src="/blank.html" style="width: 100%; height: 100%">
</iframe>
As a result, a browser tries to open the following URL in the iframe:
https://mea.cs52.visual.force.com/apex/MyCustomPage
Since the custom page is not a part of the MEA package this URL does not work.

In all other orgs where we tried to reproduce this issue, Salesforce generates absolute URLs for the same iframes and they work good:
<iframe frameborder="0" id="contentPane"
   onload="initContentFrame('https://na14.visual.force.com/apex/MyCustomPage, true, false , 'https://na14.salesforce.com' );"
   src="/blank.html" style="width: 100%; height: 100%">
</iframe>

Other AppExchange packages cause this same issue in this sandbox, but work correctly in other orgs. 
Why would Salesforce generate incorrect URLs only in this sandbox?
Hi. In Salesforce we can create a Visualforce homepage component which is based on a custom VF page. This component is displayed in IFRAME in the sidebar. We found that SF uses 2 diffirent types of URLs for these iframes in different orgs:
  • in the most of cases it generates absolute URLs:
<iframe
    frameborder="0" id="contentPane" name="contentPane"
    onload="initContentFrame('https://gs-test.na14.visual.force.com/apex/MyCustomPage?core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https%3A%2F%2Fna14.salesforce.com%2Fapex%2Fsharem__Folderize&amp;inline=1&amp;autoMapValues=1&amp;sdfcIFrameOrigin=https%3A%2F%2Fna14.salesforce.com%2Fapex%2Fsharem__Folderize&amp;core.apexpages.devmode.url=1', true, false , 'https://na14.salesforce.com' );"
    src="/blank.html" style="width: 100%; height: 100%" title="Content Pane"
</iframe>
  • in few orgs it generates relative URLs:
<iframe
    frameborder="0" id="contentPane" name="contentPane"
    onload="initContentFrame('/apex/MyCustomPage?core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https%3A%2F%2Fcs52.salesforce.com%2Fhome%2Fhome.jsp&amp;inline=1&amp;autoMapValues=1&amp;sdfcIFrameOrigin=https%3A%2F%2Fcs52.salesforce.com%2Fhome%2Fhome.jsp&amp;core.apexpages.devmode.url=1', true, false , 'https://cs52.salesforce.com' );"
    src="/blank.html" style="width: 100%; height: 100%" title="Content Pane">
</iframe>

The 2nd approach does not work if we open any Visualforce page from an AppExchange package, because such pages are based on a specific domain names (they are unique for an every package) which differ from the main domain name that is used for own custom pages. Example of a page from the "mea" package:
https://mea.cs52.visual.force.com/apex/MassEditAllActivities

Since an own page is not a part of this package, a relative URL does not work, because it's equal to the following absolute URL:
https://mea.cs52.visual.force.com/apex/MyCustomPage


So, does anybody know what SF configurations may affect this? Why does SF use absolute URLs in the most of orgs and relative URLs sometimes in several orgs? I tried to reproduce this issue in our dev org, but didn't succeed.
Managed package question!
I have a simple code that works outside the managed package (MP), but when I put it inside the MP it just gives me the objects within the package, and not all of the org's objects:
Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
                    Map<string, string> sObjectNameToLabel = new Map<string, string> ();
                    
                    for(Schema.SObjectType d : schemaMap.values())
                    {
                        Schema.DescribeSObjectResult ds = d.getDescribe();
                        sObjectNameToLabel.put(ds.getName(),ds.getLabel());
                    }
Any ideas?
Hi All.

Could you please help us to find a solution for our issue?

We need to set a custom URL for our SF Community (not a Force.com site). To do that we performed the following steps:
- registered a custom domain (www.mycompany.com) using the GoDaddy service and added a necessary CNAME there to point this URL to our SF community.
- added a domain for this URL in Salesforce.
- created a Custom URL in Salesforce to point this domain to the community.

Now, if we enter a custom URL in a browser (www.mycompany.com), then it correctly redirects us to the Salesforce community. And it's exactly what we want, except one thing: in address bar of a browser we still see old URL: XXX.force.com.

So, Is it possible to configure this custom URL so that we could see "www.mycompany.com" in an address bar? What should we pay attention for to implement this behavior?

Thank you. Gennadiy.

p.s. One of our assumptions is that we should do something more with CA-certificate and SSL-certificate. If anyone knows more whether they affect on the described problem or not, please push us in a right direction.
Hi,

We are developing and supporting a managed package in AppExchange, which works with ContentVersion objects. Last 3 weeks we started to get strange notifications from the client organizations (at the same time it's interesting to note that we didn't get any complaints from them). And we've never got such notifications previously.

The issue looks like a compilation error in the codebase. We don't believe that it's possible because of our implementation, because our package is managed and, of course,it is compiled every time when we upload a new version. Also our current codebase in the development instance is still compilable and we didn't reproduce any compilation errors in test environments where we installed the same version as our customers have.

Moreover, there is a strange first line in the stack trace, which is included in the notification:
System.test: line 32, column 17: Invalid type: Component.Apex.Page
It references to the System class, not to one of our classes. This fact makes us think that the problem is somehow related with the system changes.

We know that last 3 weeks Salesforce was delivering a new Winter 16 Release, and, maybe, the problem is somehow related with this fact, but we are not sure.

Here is full text of the typical notification:
Apex script unhandled trigger exception by user/organization: UserId/OrgId

TriggerForContentDocuments: execution of AfterUpdate

caused by: line 11, column 3: trigger body is invalid and failed recompilation: Dependent class is invalid and needs recompilation:
(package_name)
(package_name)
(package_name)
(package_name)
package_name.OneOfOurClasses: line 18, column 8: Dependent class is invalid and needs recompilation:
System.test: line 32, column 17: Invalid type: Component.Apex.Page

Maybe, someone of you met similar problems before or have any ideas what this issue may mean. Any help is appreciated. Thank you.

Hi!

I have 2 users. I want to create chatter file using insert ContentVersion with Origin=H; from the first user and access it from the second user using query. The problem is that I can see uploaded file in Files tab from both users, but cannot access it using query only from owner user. Do anybody know how to solve this? 

Thank you

Hello.

I'm trying to understand what happened with daily email limit on Developer Edition. About a year ago our team worked on the specific feature which generates hundreds of emails and sends them to internal SF users using SingleEmailMessage and its setTargetObjectId method. I remember that everything worked perfectly on Developer Edition, Sandbox and PRD (we even were able to send some thousands of emails without any problems and limits).

As of now, we're working on another feature which should generate and send many emails too. But we found that SF can't send hundreds of emails now on our Developer Edition.

I've tried to analyze the problem, but didn't find the reason:
- there are no any exceptions in logs;
- when I look at a log it says: "EMAIL_QUEUE" (email is queued);
- I even tried to reserve email capacity using the code like this Messaging.reserveSingleEmailCapacity(numberOfEmails);, but didn't get any exceptions (limit is still free).
Everything works correctly, but emails are not sent to SF users.

So, my questions:
1) is there a specific limit for emails on Developer Edition? If it's true, then what is the daily limit?
2) did I miss something in the SF documentation? I considered this description:
If you use SingleEmailMessage to email your organization’s internal users, specifying the user’s ID in setTargetObjectId means the email doesn’t count toward the daily limit. However, specifying internal users’ email addresseses in setToAddresses means the email does count toward the limit.


I'm providing a test code for those who want to check it on his Developer Edition:
//1) generate and send emails
List<Messaging.SingleEmailMessage> messages = new List<Messaging.SingleEmailMessage>();
final Integer NUMBER_OF_EMAILS = 300;
for (Integer index = 0; index < NUMBER_OF_EMAILS; index++)
{
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
    email.setTargetObjectId(UserInfo.getUserId());
    email.setSubject('Test : ' + index);
    email.setPlainTextBody('test');
    email.saveAsActivity = false;
    messages.add(email);
}
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages, false);

//2) print the results
for (Messaging.SendEmailResult result : results)
{
    System.debug(result);
}
user has create edit and delete option to the object owd is public read and write but user cant able to delete record in the object which created by other user with same role but diffrent profiles can any body suggest

Hi, everybody. I want to share my thoughts with you about the problem that I met with SOQL parser.

 

Here is the query that I tried to execute:

database.query('SELECT Id FROM Task WHERE ((AccountId IN (SELECT Id FROM Account WHERE Name like \'%test%\')) AND (ReminderDateTime > 2013-03-01T00:00:00Z)) AND (Status != \'Completed\')');

 

as a result I've got the following exception:

System.QueryException: Semi join sub-selects are only allowed at the top level WHERE expressions and not in nested WHERE expressions.

 

Let's analyze the query:

C1 = AccountId IN (SELECT Id FROM Account WHERE Name like \'%test%\')

C2 = ReminderDateTime > 2013-03-01T00:00:00Z

C3 = Status != \'Completed\'

 

Result:

... Where ((C1) AND (C2)) AND (C3)

 

 

Let's do another similar test. Everything works, if I reorganize the query in this way:

database.query('SELECT Id FROM Task WHERE (AccountId IN (SELECT Id FROM Account WHERE Name like \'%test%\')) AND (ReminderDateTime > 2013-03-01T00:00:00Z) AND (Status != \'Completed\')');

 

Analysis:

... Where (C1) AND (C2) AND (C3)

 

 

So, I can't see a real problem in the first query.

 

p.s.1: I do not exclude that this could be my error.

p.s.2: I will be very grateful for your answers, but please do not suggest to remove brackets, because this query is generated in code, and please suggest me to reorganize the query only if it's really incorrect.

Hi

 

I wrote a visualforce page and what I thought was a cool chunk of javascript which, when executed, copies values in the page from some inputfields to others (without updating the record—user can still save or cancel). It works fine except in the case of two fields which are a controller/dependent picklist pair. Boiled right down, the problem code is here:

 

document.getElementById(DestContPListID).value = document.getElementById(SourceContPListID).value;
document.getElementById(DestDepdPListID).value = document.getElementById(SourceDepdPListID).value;

 

The first line populates the controller picklist correctly but despite the second line the dependent picklist does not gain a value (most of the time). The reason seems to be that after I set the Controller picklist value (eg Tea) the dependent picklist does not show the possible values (eg English Breakfast, Earl Grey, Oolong, etc) and even when the code attempts to set it to one of these allowed values the field remains blank.

 

Note, I have tried manually setting the Controller Picklist to the desired value first (ie Tea) and then the dependent displays the possible values. If I run the script afterwards, it works fine. I assume I need something like this:

 

document.getElementById(DestContPListID).value = document.getElementById(SourceContPListID).value;
document.getElementById(SourceContPListID).systemMethodWhichKicksTheStandardControllerIntoActionToUpdateElementsOnPage;
...

 Or may be not. 

 

BTW, I am using "pure" javascript. Haven't venture into using the AJAX Toolkit yet but willing to try if it is the solution here.

 

Thanks for any help.

 

Regards

MellowRen