• creemej
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 10
    Replies

Hi,

 

What must I do to protect my javascript code against copying.

How is this organised in a salesforce app?

Where can I find some info on this?

 

thanks for your help,

 

Jan

  • September 19, 2010
  • Like
  • 0

Hi,

 

When I try to customize my Home-page in Personal Setup - Change My Display, I get this message:

 

Please have your administrator enable at least one dashboard for you to view.

 

Where can I do this?

 

Thanks for your help,

 

Jan

Hi,

 

I have a test site with different Visualforce pages and some standard (FileNotFound, SiteRegister) and simple pages (just labels).

 

The standard and simple pages work fine, but my Visualforce pages do not render correctly.

These render like this:

���<�c�e�n�t�e�r�>� � � � � �<�t�a�b�l�e� �b�o�r�d�e�r�=�"�0�"� �w�i�d�t�h�=�9�0�%�>� � � � � � � � � �<�t�r�>�<�t�d� �v�a�l�i�g�n�=�t�o�p�>� � � � � � � � �<�t�a�b�l�e�>� � � � � � � � �<�t�r�>�<�t�d� �c�l�a�s�s�=�"�Q�u�o�t�e�H�e�a�d�e�r�L�a�b�e�l�"� �n�o�w�r�a�p�>�<�b�>����� �:�<�/�b�>�<�/�t�d�>�<�t�d�

 

The documentation says:

Creating a Force.com Site

To create a basic Force.com Site, you need to follow the following four steps:

  • Register a domain name
  • Create a Force.com Site using the domain name
  • Assign Visualforce pages to the Site

 

There must be some restrictions/limitations for the Visualforce pages, which I don't know.

Where can I find this information?

 

Thanks,

Jan

 

 

Message Edited by creemej on 27-11-2009 11:23 AM
Message Edited by creemej on 27-11-2009 11:24 AM
Message Edited by creemej on 27-11-2009 11:25 AM
Message Edited by creemej on 27-11-2009 11:25 AM

Hi,


With these 2 methods, I have different options, which I would like to combine in one dynamic method:

1. Navigation to object (VisualForce or JavaScript).
   Some aspects (sidebar/related lists) are impliciet and can not be changed.

   Example from JavaScript, but same in VisualForce/Apex:
  
   //Display mode
   var soid = "00Q8000000Lv7eEEAR";
   //Edit mode
   if (mode == "E") {
     soid += mode;
   }
   document.location.href = "/"+soid;

   + display/edit mode
   + impliciet tabStyle is OK

   - always with sidebar
   - always related lists in display mode.

2. Navigation to one dynamic VisualForce page with an <apex:detail>-tag.
   This way let's combine the options of the <apex;page> and <apex:detail> tags,
   but I can not specify the display/edit mode, and the tabStyle is not impliciet or dynamic!

 

   document.location.href = "/apex/SFDCPage";
 

   <!-- apex:page id="sfdcPage" controller="SoidController" sidebar="false" showHeader="true" tabStyle="Account" -->
   <apex:page id="sfdcPage" controller="SoidController" sidebar="{!side}" showHeader="{!header}" tabStyle="{!style}">
    <apex:form>
     <apex:outputPanel>
      <!-- apex:detail subject="{!soid}" relatedList="false" title="true"/ -->
      <apex:detail subject="{!soid}" relatedList="{!related}" title="{!title}"/>
     </apex:outputPanel>

    </apex:form>
   </apex:page>

   + page/sidebar (true/false)
   + page/header (true/false)
   + detail/relatedList (true/false)

   - display/edit mode
   - page/tabStyle (only expliciet value, no impliciet tabStyle).

Is there a way that I can have all options combined in one dynamic method,
callable from VisualForce/Apex or direct from JavaScript?

Thanks,

Jan

Message Edited by creemej on 05-18-2009 11:50 AM
Message Edited by creemej on 05-18-2009 12:13 PM
Hi,

I try to understand this Governor Limit (from apex_language_reference/winter'09):

You can only use 10 getChildRelationships method calls per sObject during the execution of an Apex script.
For example, an Apex script can execute 10 getChildRelationships method calls for Account, then another 10 for Lead. For more
information about governor limits, see Understanding Execution Governors and Limits on page 142.

I read: 10 for Account, 10 for Contact, 10 for Contract  ... but not 10 for ALL !!!

Is there a way to do something dynamicaly?

Thanks,
creemej

Schema.DescribeSObjectResult r;
List<Schema.ChildRelationship> childRelationships;

//Account
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();

//Contact
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();

//Contract
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();

Hi,

 

What must I do to protect my javascript code against copying.

How is this organised in a salesforce app?

Where can I find some info on this?

 

thanks for your help,

 

Jan

  • September 19, 2010
  • Like
  • 0

Hi,

 

I have a test site with different Visualforce pages and some standard (FileNotFound, SiteRegister) and simple pages (just labels).

 

The standard and simple pages work fine, but my Visualforce pages do not render correctly.

These render like this:

���<�c�e�n�t�e�r�>� � � � � �<�t�a�b�l�e� �b�o�r�d�e�r�=�"�0�"� �w�i�d�t�h�=�9�0�%�>� � � � � � � � � �<�t�r�>�<�t�d� �v�a�l�i�g�n�=�t�o�p�>� � � � � � � � �<�t�a�b�l�e�>� � � � � � � � �<�t�r�>�<�t�d� �c�l�a�s�s�=�"�Q�u�o�t�e�H�e�a�d�e�r�L�a�b�e�l�"� �n�o�w�r�a�p�>�<�b�>����� �:�<�/�b�>�<�/�t�d�>�<�t�d�

 

The documentation says:

Creating a Force.com Site

To create a basic Force.com Site, you need to follow the following four steps:

  • Register a domain name
  • Create a Force.com Site using the domain name
  • Assign Visualforce pages to the Site

 

There must be some restrictions/limitations for the Visualforce pages, which I don't know.

Where can I find this information?

 

Thanks,

Jan

 

 

Message Edited by creemej on 27-11-2009 11:23 AM
Message Edited by creemej on 27-11-2009 11:24 AM
Message Edited by creemej on 27-11-2009 11:25 AM
Message Edited by creemej on 27-11-2009 11:25 AM

Hi,

 

I'm trying a fairly simple call of an Apex method from a custom detail button in Account. The argument I need to send is the Account object itself. I don't know how to reference it. I tried the example from the Apex development guide, which is:

 

{!requireScript("/soap/ajax/15.0/connection.js")}
{!requireScript("/soap/ajax/15.0/apex.js")}
var acct = sforce.sObject("Account"); 
var id = sforce.apex.execute("myClass","makeContact",
                             {lastName:"Smith",
                              a:account});

 

Even if I comment out the call to apex, the line

var acct = sforce.sObject ("Account");

Gives me an error:  Object doesn't support this property or method.

 

I also tried through a global variable

var acct = $ObjectType.Account;

But that doesn't work either.

 

What am I missing? How do I reference the Account object in a button?

 

Thanks very much.

Hi,

I try to understand this Governor Limit (from apex_language_reference/winter'09):

You can only use 10 getChildRelationships method calls per sObject during the execution of an Apex script.
For example, an Apex script can execute 10 getChildRelationships method calls for Account, then another 10 for Lead. For more
information about governor limits, see Understanding Execution Governors and Limits on page 142.

I read: 10 for Account, 10 for Contact, 10 for Contract  ... but not 10 for ALL !!!

Is there a way to do something dynamicaly?

Thanks,
creemej

Schema.DescribeSObjectResult r;
List<Schema.ChildRelationship> childRelationships;

//Account
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Account.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();

//Contact
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contact.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();

//Contract
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();
r = Contract.SObjectType.getDescribe();
childRelationships = r.getChildRelationships();

Visualforce newbie.
 
I wonder if it is possible to call a customer controller action from java script.
 
here is what i want to do:
 
I have a input field and a button. I have binded the button to an action from the controller. No issues there. I have added a onkeypress on the input field. So that when the enter key is pressed, I want to call the action method bound to the button.
 
Thanks in advance.
 
  • September 12, 2008
  • Like
  • 0