• SL Tan
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 71
    Replies

Hi

I wonder if anyone has come across the same scenario:

 

A user needs to input box numbers from which a certain starting number to the last box number.

Normally if it is going to be just a few boxes, it can be done with fields catering to the maximum numbers allowed in a page.

However in this case, the number of boxes can be anything from 1 to 100 or more, thus it is not practical to have a page that needs a user to key in the numbers one by one, from the start number to the last box number, and also time wasting.

Thus to solve this, if the user is going to deliver 11 boxes from Box No 10 to Box no 20, the user will input

as follows in the fields:

Box No. From: 10  

Box No. To: 20

Then the program calculates by way of formula –

Total No of Boxes: 11 – formula is [ (Box No. To – Box No. From)+1 ]

 

 

Up to this stage is ok. Now the user needs to prints out a report for the Box Nos delivered, thus the report needs to show the Box Nos: 10,11,12,13…..until 20.

Has anyone solved such a reporting requirement before? If so, please could you kindly advise how it is solved?

Any pointer will be highly appreciated>

I am using the following code in the beginning of a VF Page:

 

<apex:page standardController="Custom_Object__c" showHeader="false" renderAs="pdf" standardStylesheets="true"> <body> <apex:stylesheet value="{!URLFOR($Resource.pdfresource,'styles.css')}"/> <apex:image value="{!URLFOR($Resource.pdfresource,'logo.gif')}"/>

 I would like to replace the "Visualforce 8 pages2pdf logo" with a new logo. I tried to do this by removing the last 2 lines of code and replace by

<apex:image url="{!$Resource.NewLogo}" width="50" height="50" />
 but it does not appear to work as the same Visualforce 8 pages2pdf logo continue to appear. Does anyone know how to solve this. Any pointers will be highly appreciated. Thank you in advance.

 

  • September 21, 2009
  • Like
  • 0

Hi

I wonder if anyone can help me to advise on the test method  I should be using to test the following apex class. I am quite new to writing the test methods into the apex classes I have created and is at a loss at to how to solve for a public list query as below;

Any pointers will be highly appreciated.

Thanks and Best Regards

SL

 

public List<Contact> getMyContacts() {
return [SELECT Id, Name, Account.Name FROM Contact
];
}
  • April 29, 2009
  • Like
  • 0

I have following coding in my Visualforce Page, it is supposed to output the date using Date Data Type:

<apex:outputText value="Contract Date:" style="font-weight:bold"/>

<apex:outputText value="{!Greige_Order__c.Contract_Date__c}"/>

 

The output shows Day, Date and Time instead of the normal format of 23/04/2009-

 

Contract Date:              Wed Apr 23 00:00:00 GMT 2008

 

I have another coding on the same VF page also using the Date Data Type for the First_Del_Mth__c field:

<apex:outputText value="{!New_Order__c.First_Del_Mth__c} "/>

The output is as follows, which is what is needed:


31/05/2008

 

Does anyone has the same problem and if so, how could this be solved?.

Any pointer will be highly appreciated

Many thanks in advance 

SL

  • April 27, 2009
  • Like
  • 0
Hi
I have been using the following S-Control header code to extract data for reports using button links successfully but now it just won't work. Could someone knowledgeable please kindly advise me what is wrong. I tried to change the script src to ajax 10.0, 11.0 and 12.0 but it just doesn't work. Any pointers will be highly appreciated.
Thanks in advance!

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<link href="/dCSS/Theme2/default/common.css" type="text/css"
media="handheld,print,projection,screen,tty,tv" rel="stylesheet" >
<link href="/dCSS/Theme2/default/custom.css" type="text/css"
media="handheld,print,projection,screen,tty,tv" rel="stylesheet" >
<link href="/general/hide.css">
<style type="text/css" media="print">

@page port {size: portrait;}
@page land {size: landscape;}

.portrait {page: port;}

.landscape {page: land;}
.hide {
display: none;
}
</style>
<html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script src="/js/dojo/0.4.1/dojo.js"></script>

 

  • September 20, 2008
  • Like
  • 0
I have a custom child object that has both pick-lists and multi-picklists data type. I use the Cross Object Formula in the parent custom object using "CASE" method to get the pick-lists data successfully.

However I have not been successful in using the Cross Object Formula to get the multi-picklists data. Is it because Cross Object Formula does not support multi-picklists data type?. When I used the Advanced Formula to select the child object records all the multi-picklist items are missing from the child object items.

Has anyone faced the same problem? If so, I do hope he/she will be able to share how it had been resolved. Any pointer will be highly appreciated
Thanks in advance
SL
  • August 30, 2008
  • Like
  • 0

I have a question regarding Print Anything. How do we change the font size for the reports generated from Print Anything Templates? This may be a very basic question but I don't seem to be able to resolve this successfully.
We are using the following coding for the stylesheet
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<link href="/dCSS/Theme2/default/common.css" type="text/css"
media="handheld,print,projection,screen,tty,tv" rel="stylesheet" >
<link href="/dCSS/Theme2/default/custom.css" type="text/css"
media="handheld,print,projection,screen,tty,tv" rel="stylesheet" >
<style type="text/css" media="print">

@page port {size: portrait;}
@page land {size: landscape;}
.portrait {page: port;}

.landscape {page: land;} 

 Any pointers will be highly appreciated
Thanks in advance
SL
  • April 15, 2008
  • Like
  • 0

Hi
I hope someone has done the same thing and can help point out what is wrong with my problem here.
I wanted to change the Lead Home Page Tab to remove the Reports, Tools and Summary portions from the Content area of the Lead Home Tab.
The code from the Lead Home Page is copied using Web Developer View Source and by deleting the parts of the code for the Reports, Tools, Summary and also the left frames for Search, Recent Items, etc and the top frame for the tabs, logos, etc, the resulting Home Page interface looks perfect. However when I click on any of the links for example NEW button in the Content area, the return page includes the left frame and top frame interface within the content portion apart from the New Page.
Could someone help me as to what should I be looking for to amend in the coding? I have tried to look at the various materials available but could not find anything close as to how to solve this issue.
Any pointer will be highly appreciated
Thanks in advance
SL
  • November 02, 2007
  • Like
  • 0

Hi
I hope someone can help me point to correct direction for this problem
Using Ajax Toolkit I have been able to successfully generate the results from the Select Statement below

sforce.connection.query("SELECT Id, Name, cmi__Selected_Color__c, cmi__Selected_Color_Qty_del__c,   cmi__Production_Order_No__r.Id, cmi__Production_Order_No__r.Name, (SELECT Id, Name, cmi__Color_Name__c, cmi__Ctn_Nos_Packed__c FROM R00N50000001cypTEAQ), (SELECT Id, Name, cmi__Color_Name__c, cmi__Ctn_Nos_Packed__c FROM R00N50000001cpNnEAI), (SELECT Id, Name, cmi__Color_Name__c, cmi__Ctn_Nos_Packed__c FROM R00N50000001cypOEAQ), (SELECT Id, Name, cmi__Color_Name__c, cmi__Ctn_Nos_Packed__c FROM R00N50000001cyDIEAY) FROM cmi__Packing_List__c",callback);

Packing List is the Master Object in question, Production Order No is the Parent, and
R00N50000001cypTEAQ,R00N50000001cpNnEAI,R00N50000001cypOEAQ,R00N50000001cyDIEAY
are the Child Objects.

In this case, one Production Order No (Parent) can have several Packing Lists (Master). What I tried to do using the WHERE clause is to get say if there are 6 Packing Lists associated with the Parent, I would like the result to show only this particular Parent Record with its data on the 6 Packing Lists and the associated Child Object information. Could someone please help me point out how the WHERE clause should be handled

I have tried this but it does not output any record -

WHERE cmi__Production_Order_No__r.Id='{!cmi__Packing_List__c.cmi__Production_Order_NoId__c}' AND cmi__Production_Order_No__r.Name='{!cmi__Packing_List__c.cmi__Production_Order_No__c}' ",callback);
Any advice would be highly appreciated
Thanks in advance

SL

Message Edited by SL Tan on 10-01-2007 06:56 PM

  • October 01, 2007
  • Like
  • 0

Hi
I am wondering if it is possible to introduce a Splash Page for the Standard Objects such as Leads and Accounts so that we can add some information with regards to custom fields we have created for these Standard Objects for new users?
Any advise is highly appreciated
Thanks in advance
SL
  • August 28, 2007
  • Like
  • 0

Hi
I wonder if anyone can help me please on this - I have a print report function which uses this code <a href="#" onclick="window.print();return false;">Print</a> to allow users to print the generated report. When the report is printed, it shows on the top right the url (eg https://na3.salesforce.com -----etc) and the date and time on the bottom right. Is there a way that I can hide these 2 items when the report is printed? Since the report is carrying the clause that this is a computer generated report and no signature is required. it will make the printed report looks better without these 2 items showing.
I do hope someone will be able to help me point to the right direction to solve this
Thanks in advance
SL
  • August 18, 2007
  • Like
  • 0

Hi
Does anyone know if it is at all possible to "hide" the Reports and Tools items on the tab pages for Leads, Accounts and Contacts? If so, I will appreciate some pointer on how to do this.
In the case of a Report, how do we point it to another report or change to another report showing on the Report item?
Hope someone can help me on this
Many thanks in advance
SL
  • August 16, 2007
  • Like
  • 0
Hi
I wonder if anyone can help me here. I have a custom object with a number of item amounts that I would like to use an S-control to sum up the amount as a Total Amount (Not using the Custom Formula for this case) Does anybody have a coding sample that can be shared with me, to select the item amounts and then push to sum them up?
Any pointer will be highly appreciated
Thanks in advance
SL
  • August 15, 2007
  • Like
  • 0

I wonder if anyone has come across the same situation and can advise me.
I have an S-control custom link on a Custom Object A that generates a report extracting data from fields in the Custom Object A. The merge fields referencing the Custom Object A extracts the data nicely. However I have a few fields where data need to be extracted from another Custom Object B.
These data from B can be generated from another S-Control C to show on A after Save successfully.
However there does not seem to be a way to get the merge field data from B to show in this report . I tried to use the Field Type $SControl and use C for the Merge Field but got the following comments when the report is generated :
/servlet/servlet.Integration?lid=01N500000008xFK&eid=__ENTITY_ID__&enc=UTF-8&ic=1
I hope someone will be able to point out what is wrong here and what should be the solution
Many thanks in advance
SL
Hi
I hope I am posting this in the correct Discussion Board
I have used Print Anything to successfully generate a Report
However the CSS code which is given in the accompanying Print Anything Document does not seem to work on my report
Has anyone come across the same problem and if so, how can this be addressed?
Any pointer will be highly appreciated
Thanks in advance
SL
Hi
I have a Custom Object in which I have 14 Formula Fields (Currency) for Sub-Amounts. I need to add up all these Sub-Amount Fields to arrive at a Total Amount for this Custom Object. I tried to use the Formula option but it returns with a compile limit as only 5,000 is allowed but my calculation goes beyond 8,000. I tried to solve this by using 2 Formula Fields each adding up 7 Sub-Amounts and then create another Formula Field to add these 2 totals but it still has the same compile problem message.
I tried but cannot use the Workflow Action option as we cannot do fieldupdate calculation based on Formula fields unfortunately.
Thus I think I have to use a S-control to resolve this. Can anyone please kindly advise me how should my coding be like after Select From statement in order to let the S-Control tabulate the Sub-Amounts to arrive at the Total Amount?
I am sorry if this sounds a primitive question but as I am not familiar with coding, I hope someone can point this out and assist me
Many thanks in advance
SL
Hi

I wonder if anyone has come across this scenario which I am trying to solve.

Firstly, I have a Custom Object called "Exclusive Contract" in which a customer can place order in advance for example 10,000 units of a product, and the customer is allowed to take delivery of the quantity over a period of months that will be stipulated in the Exclusive Contract.

Secondly, the business procedure requires that a Sub-Contract, say A, is issued when the customer takes the first delivery, for example say 2,000 units. (Sub-Contracts have to be issued as new details are added) This is followed by other Sub-Contracts B, C, etc, being issued until the customer takes up all the 10,000 units. The Sub-Contracts are also custom objects placed in the Related List of the "Exclusive Contract" object.

When Sub-Contract A is issued, the Sub-Contract A will show the original qty of 10,000 units, the required quantity of 2,000 units and the balance of 8,000 units. This means that when Sub-contract B is issued and if the quantity for B is 3,000 units, the Sub-Contract B must show a balance of 5,000 units (10,000 - 2,000 - 3,000 units)

My problem is how to handle the formula for the balance for Sub-Contracts B, C, onwards, because the coding must take care of the fact that there can be two or more unknown number of Sub-Contracts that will be issued until the original 10,000 units are taken up. I found that I could not use the Formula method as this can only use for the custom object concerned only.

Has anyone handled such a situation before and if so, would it be better to use an SControl or Custom Link? I am in favour of using a Custom Link with a URL method if this is at all possible but I cannot visualise if this method can handle formulas and how to go about it. Ideally what I hope to achieve is that when a user creates a new Sub-Contract, the field for the Balance Quantity automatically shows the balance against the Exclusive Contract once the user inputs the quantity for that particular Sub-Contract.

I really do hope someone has come across the same scenario and is able to advise me on how to manage this situation. Any pointers will be highly appreciated.
Thanks in advance
SL

I am trying to put in a control formula for the date field where a user can only select a date that is on the same day the user is inputing the data or a day that is earlier but the user cannot select the next day or a date that is later. Does anyone try to do this before? If so, I would appreciate some advise on how to code for the formula in the date field. Any help will be highly appreciated. Thanks in advance
SL

Hi
I wonder if anyone can help me with this problem.
I created a new Custom Link Button with the List Button Display Type.
In the List View this new Button is showing after I have added it to the List View
Now I would like to place this Button on the Related List as well but when I double clicked on the Related List item in the Object , I could only see the Columns and Standard Buttons but not the Custom buttons. So I dont know how to put this button on the Related List item. Does anyone have this problem before and if so, how do we get the new Custom Button to appear in the Related List edit function?
Any pointer will be highly appreciated
Thanks in advance
SL
Could anyone please kindly advise what is wrong with my coding below? I am querying one type of data in each of 2 objects in one S-Control using the Select/From/Where Statements. I could get the output correctly for each type of data for each object but when it shows on the output it only shows one object's data in both output.Any pointer will be highly appreciated
Thanks in advance - SL
 
This is my code used
<html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script src="/js/dojo/0.4.1/dojo.js"></script>
<script>
  dojo.addOnLoad(init);
function init() {
  var callback = {    onSuccess : displayResult,
    onFailure : displayError
  };
  sforce.connection.query("SELECT Id, Name FROM New_Type__c   WHERE  Id = '{!Customer_Order__c.New_TypeId__c}'   " , callback );
 sforce.connection.query("SELECT Id, Name FROM Final_Buyer__c   WHERE  Id = '{!Customer_Order__c.Final_BuyerId__c}'   " , callback );
}
function displayResult(result) {
  var it = new sforce.QueryResultIterator(result);
  var html = [];
  while(it.hasNext()) {
    var record = it.next();
    html.push(  "<b>New Type: </b><br>  " + record.Name + " <br><br>"); 
    html.push( "<b>Final Buyer: </b><br>  " + record.Name + " <br>");    
       html.push("<hr>");
  html.push("<br>");
}
  document.getElementById("output-div").innerHTML = html.join("");
}
function displayError(error) {
  document.getElementById("output-div").innerHTML =
    "oops something went wrong ... " + error;
}
</script>

</head>
<body>
  <div id="output-div"></div>
</body>
</html>

Hi

I wonder if anyone has come across the same scenario:

 

A user needs to input box numbers from which a certain starting number to the last box number.

Normally if it is going to be just a few boxes, it can be done with fields catering to the maximum numbers allowed in a page.

However in this case, the number of boxes can be anything from 1 to 100 or more, thus it is not practical to have a page that needs a user to key in the numbers one by one, from the start number to the last box number, and also time wasting.

Thus to solve this, if the user is going to deliver 11 boxes from Box No 10 to Box no 20, the user will input

as follows in the fields:

Box No. From: 10  

Box No. To: 20

Then the program calculates by way of formula –

Total No of Boxes: 11 – formula is [ (Box No. To – Box No. From)+1 ]

 

 

Up to this stage is ok. Now the user needs to prints out a report for the Box Nos delivered, thus the report needs to show the Box Nos: 10,11,12,13…..until 20.

Has anyone solved such a reporting requirement before? If so, please could you kindly advise how it is solved?

Any pointer will be highly appreciated>

Background Info:

 

I have a custom object named "Rec".  I created a custom link for my "Rec" custom object.  When the custom link is clicked it will open up an input form (Visualforce Page) on another custom object called "Checklist". 

 

 

My Problem:

 

I cannot get data in fields on my "Rec" object to automatically populate fields in my "Checklist" form when I click my custom link.  More specifically, I need the information in the "deeds" field on my "Rec" object to automatically populate the "deeds" form
field on my "Checklist" object when I click my custom link.



I've tried both links below.  They will direct me to my Checklist form, but the "deed" field on my checklist form is blank and will not populate with the data from my "Rec" object.

 

 
/apex/cklstpurstep1?CF00N40000001skap_lkid={!File__c.Id}&00N40000001q1QS={!File__c.Number_of_Deeds__c}&retURL=%2F{!File__c.Id}&sfdc.override=1

 

 /apex/cklstpurstep1?00N40000001q1QS={!File__c.Number_of_Deeds__c}&CF00N40000001skap_lkid={!File__c.Id}&retURL=%2F{!File__c.Id}&sfdc.override=1

 

 

The deed field on both objects are the same type (Number fields).  I've looked over documentation and I cannot figure out what I'm doing wrong.  I know this should be really simple.



 Please help!!






 

Hi

I wonder if anyone can help me to advise on the test method  I should be using to test the following apex class. I am quite new to writing the test methods into the apex classes I have created and is at a loss at to how to solve for a public list query as below;

Any pointers will be highly appreciated.

Thanks and Best Regards

SL

 

public List<Contact> getMyContacts() {
return [SELECT Id, Name, Account.Name FROM Contact
];
}
  • April 29, 2009
  • Like
  • 0

I have following coding in my Visualforce Page, it is supposed to output the date using Date Data Type:

<apex:outputText value="Contract Date:" style="font-weight:bold"/>

<apex:outputText value="{!Greige_Order__c.Contract_Date__c}"/>

 

The output shows Day, Date and Time instead of the normal format of 23/04/2009-

 

Contract Date:              Wed Apr 23 00:00:00 GMT 2008

 

I have another coding on the same VF page also using the Date Data Type for the First_Del_Mth__c field:

<apex:outputText value="{!New_Order__c.First_Del_Mth__c} "/>

The output is as follows, which is what is needed:


31/05/2008

 

Does anyone has the same problem and if so, how could this be solved?.

Any pointer will be highly appreciated

Many thanks in advance 

SL

  • April 27, 2009
  • Like
  • 0

I have been following the cookbook and want to display a list using visualforce of all the accounts that are applying and awaiting 2 screenings. I have tested the code using apex explorer and this apex returns a list of sobjects. But when I try to move through them using visual force I get the following error. How can I rewrite this code to display all the names?

 

<apex:pageBlock title="Select a Candidate">
<apex:dataTable value="{!account}" var="u" cellPadding="4" border="1">
<apex:column >{!u.name}</apex:column>
<apex:column >{!u.id}</apex:column>
</apex:dataTable>
</apex:pageBlock>

public Account getaccount() {
return [select id, name from Account where Recruitment_status__pc = 'Applying' AND Application_sub_stage__pc = 'Awaiting 2 screenings'];
}

 

 

Hi
I have been using the following S-Control header code to extract data for reports using button links successfully but now it just won't work. Could someone knowledgeable please kindly advise me what is wrong. I tried to change the script src to ajax 10.0, 11.0 and 12.0 but it just doesn't work. Any pointers will be highly appreciated.
Thanks in advance!

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<link href="/dCSS/Theme2/default/common.css" type="text/css"
media="handheld,print,projection,screen,tty,tv" rel="stylesheet" >
<link href="/dCSS/Theme2/default/custom.css" type="text/css"
media="handheld,print,projection,screen,tty,tv" rel="stylesheet" >
<link href="/general/hide.css">
<style type="text/css" media="print">

@page port {size: portrait;}
@page land {size: landscape;}

.portrait {page: port;}

.landscape {page: land;}
.hide {
display: none;
}
</style>
<html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script src="/js/dojo/0.4.1/dojo.js"></script>

 

  • September 20, 2008
  • Like
  • 0
I have a custom child object that has both pick-lists and multi-picklists data type. I use the Cross Object Formula in the parent custom object using "CASE" method to get the pick-lists data successfully.

However I have not been successful in using the Cross Object Formula to get the multi-picklists data. Is it because Cross Object Formula does not support multi-picklists data type?. When I used the Advanced Formula to select the child object records all the multi-picklist items are missing from the child object items.

Has anyone faced the same problem? If so, I do hope he/she will be able to share how it had been resolved. Any pointer will be highly appreciated
Thanks in advance
SL
  • August 30, 2008
  • Like
  • 0

Hi
I hope someone has done the same thing and can help point out what is wrong with my problem here.
I wanted to change the Lead Home Page Tab to remove the Reports, Tools and Summary portions from the Content area of the Lead Home Tab.
The code from the Lead Home Page is copied using Web Developer View Source and by deleting the parts of the code for the Reports, Tools, Summary and also the left frames for Search, Recent Items, etc and the top frame for the tabs, logos, etc, the resulting Home Page interface looks perfect. However when I click on any of the links for example NEW button in the Content area, the return page includes the left frame and top frame interface within the content portion apart from the New Page.
Could someone help me as to what should I be looking for to amend in the coding? I have tried to look at the various materials available but could not find anything close as to how to solve this issue.
Any pointer will be highly appreciated
Thanks in advance
SL
  • November 02, 2007
  • Like
  • 0

Hi
I am wondering if it is possible to introduce a Splash Page for the Standard Objects such as Leads and Accounts so that we can add some information with regards to custom fields we have created for these Standard Objects for new users?
Any advise is highly appreciated
Thanks in advance
SL
  • August 28, 2007
  • Like
  • 0