• a contrator
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi Friends,

 

I am wondering why the following code works:

 

List<account> actlist = [ select id, name from account where name like 'xxx %'];

List<contact> contlist = [select id from contact where accountId = :actlist];

system.debug(contlist.size());

 

Actually I noticed the second line will be redered as "...where accountId IN :actlist".

 

Does anybody find the official reference regrading the syntax of "..where id = :list "  for me ?

 

Thanks !

Why my javascript does not work ?

 

Here is what I tested:

 

(1) create a custom component 'test' ---type:  HTML Area, ticked "show HTML",  content:   <script> alert('testing....);</script>

(2) add this component to my default home page layout

(3) check "show custom sidebar components on all pages"

 

(4) click on any TAB,  the component only display the name "test" on the sidebar, no javascript running

(5) same thing if the javascript is like

<script>

function init() {
   alert("testing...");
}
window.onload = init;

</script>

 

Any help will be greatly appreciated.

Hi experts:

 

For regular picklist (which is not a multiselect picklist),  'like' or 'includes' is not valid in the SOQL query.  So how to implement the similar feature to query the picklist field in a SOQL ?

Hi,

In our application, the user must access the internal news / message.
As a simple test, I use <apex:param name="a"  value="news1,content"  assignTo="{!content}"/>  within <apex:commandLink>.  The problem is, the variable "content" can only get the value"news1".  In other word, if the string value contains a comma "," , all contents after comma will be ignored.  How to deal with it ?   Actually, the message is a long string including many commas and line breaks.  How can I get the whole content by using <apex:param name="a" value="{!each.Message__c} assignTo="{!content}"/>  and display it in a right way (including line breaks) ?

 

Thank you very much!

 

The test code:

<apex:page controller="testmsg">
 <apex:outputtext value="{!content}" style="color:red"/>
<br/>
<apex:form >
  <apex:commandlink action="{!dosomething}" value="test message box">
    <apex:param name="a" value="news1,content" assignTo="{!content}"/> 
  </apex:commandlink>
</apex:form>
</apex:page>

public class testmsg{

public string content{get;set;}
public void dosomething(){
//
}
}

 

Hi,
In our application, the user must access the internal news / message.
As a simple test, I use <apex:param name="a"  value="news1,content"  assignTo="{!content}"/>  within <apex:commandLink>.  The problem is, the variable "content" can only get the value"news1".  In other word, if the string value contains a comma "," , all contents after comma will be ignored.  How to deal with it ?   Actually, the message is a long string including many commas and line breaks.  How can I get the whole content by using <apex:param name="a" value="{!each.Message__c} assignTo="{!content}"/>  and display it in a right way (including line breaks) ?

Thank you very much!

The test code:

<apex:page controller="testmsg">
 <apex:outputtext value="{!content}" style="color:red"/>
<br/>
<apex:form >
  <apex:commandlink action="{!dosomething}" value="test message box">
    <apex:param name="a" value="news1,content" assignTo="{!content}"/> 
  </apex:commandlink>
</apex:form>
</apex:page>

public class testmsg{

public string content{get;set;}
public void dosomething(){
//
}
}

 

 
 

Hi Friends,

 

I am wondering why the following code works:

 

List<account> actlist = [ select id, name from account where name like 'xxx %'];

List<contact> contlist = [select id from contact where accountId = :actlist];

system.debug(contlist.size());

 

Actually I noticed the second line will be redered as "...where accountId IN :actlist".

 

Does anybody find the official reference regrading the syntax of "..where id = :list "  for me ?

 

Thanks !

Why my javascript does not work ?

 

Here is what I tested:

 

(1) create a custom component 'test' ---type:  HTML Area, ticked "show HTML",  content:   <script> alert('testing....);</script>

(2) add this component to my default home page layout

(3) check "show custom sidebar components on all pages"

 

(4) click on any TAB,  the component only display the name "test" on the sidebar, no javascript running

(5) same thing if the javascript is like

<script>

function init() {
   alert("testing...");
}
window.onload = init;

</script>

 

Any help will be greatly appreciated.

Hi experts:

 

For regular picklist (which is not a multiselect picklist),  'like' or 'includes' is not valid in the SOQL query.  So how to implement the similar feature to query the picklist field in a SOQL ?

I tried to validate this and I got: Error: Compiled formula is too big to execute (31,974 characters). Maximum size is 4,000 characters - what is the character count based on? Any ideas on how to run this more efficiently?
 
 
 
CASE(X6_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c + X4_Payment_Amount__c + X5_Payment_Amount__c + X6_Payment_Amount__c),CASE(X5_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c + X4_Payment_Amount__c + X5_Payment_Amount__c),CASE(X4_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c + X4_Payment_Amount__c),CASE(X3_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c + X3_Payment_Amount__c),CASE(X2_Payment_Status__c,"Collected",(X1_Payment_Amount__c + X2_Payment_Amount__c),CASE(X1_Payment_Status__c,"Collected",X1_Payment_Amount__c,null))))))