• arasu
  • NEWBIE
  • 145 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 162
    Questions
  • 87
    Replies
Hi,
 
We have the following visualforce page for new Lead that uses an ActionSupport tag. The functionality is to rerender the Street name field to auto-populate the information based on the postal code information entered. The issue is that the page does a validation before submitting the information to server when user enters the postal code; and the auto-population of street name fails. But if all the madatory information is entered in the VF lead page like (Lead name,Company,Street Number,etc) before the request is submittied with the postal code, then it works fine and populates the rest of the address.
 
We also tried using the "immediate"  attribute of actionSupport tag byt setting it to false like this, but in vain.
 
Please find the attached VF page and Controller. This is the snippet of VF code that is having issues:
 
Code:
            <apex:inputField value="{!lead.Postal_Code__c}" required="true" id="postal_code">           
                 <apex:actionSupport event="onblur"   action="{!addressAutoPop}"  reRender="sname" immediate="true" />
            </apex:inputField>            
             <apex:inputField id="snumber" value="{!lead.Street_Number__c}" required="true"/><b/>
                <apex:inputField id="sname" value="{!lead.Street_Name__c}" />           


 
Appreciate all your valuable feedbacks.

Thanks and regards
  • November 04, 2008
  • Like
  • 0
Hi,
 
We are using Apex Email services to automate a *custom* approval process received via email.
 
The workflow is something like this:
1. User 'Sam' recieves email for approval. Sam may not have a salesforce.com user license.
2. User 'Sam' replies to salesforce generated email with approved status (on the subject line)
3. Saleforce then processes the email and updates the record status to approved and sends another email to implementation group.
 
We are facing a problem here. When the second email is send out to the implementation group, the from email address is not Sam's email address; instead it is the email address specified as the "context" user under Apex Email Services settings.
This is confusing as implementation team tend to reply back to the wrong person(i.e. the context user and not the actual approver) by clicking the "Reply" button!
 
How can we forcibly or manually set the *from* email address to the approver's email id or the email id of the person who initiates step 3 above? In the above scenario, the from email address in the email sent at step 3 should be Sam's email id.
We greatly appreciate any feedback on this issue.
 
Thanks and regards,
Ambili
  • October 27, 2008
  • Like
  • 0
Hi,
 
We have a very important requirement to customize the Partners object (not the partner portal) related list in Account. This is the standard salesforce functionality where users can select multiple partners with different partner roles. We also need to get the reverse role to work as it works in the standard functionality.
 
Is it possible to create the same functionality using Visualforce?
I greatly appreciate all your valuable feedbacks on this.
 
regards

 
  • October 08, 2008
  • Like
  • 0

Hi,

Recently we noted that for the User Report, the field Role is displayed as "5Role".
The role field appears correctly as "Role" on all other user page layouts except in the Reports?

Can anyone please comment on why is there a “5” in front of the “Role” and how to get this removed? Thanks for all your feedbacks.

Regards,
Ambili

 

  • October 06, 2008
  • Like
  • 0

Hi,

 

Experienced salesforce.com administrator/developer available for freeelance/part-time job.

**Design and develop custom applications using the force.com platform

**S-controls, Visualforce and Apex (including triggers).

**Data and database issues.

**Quick turnaround time and can also provide 24X7 support for any issues after implementation.

**Rates are negotiable to fit within your budget.

If you have any questions, please email me at kgrasu@yahoo.com.

Thanks and regards,
Rasu

  • September 15, 2008
  • Like
  • 0
Hi,
 
I have a custom button that executes a javascript code when clicked. It works fine for all user profiles in production, but does not work in sandbox and throws the following error message:
 
[object Error]-sforce.apex is null or not an object
It works in sanbox only for administrator profile.

Appreciate is anyone can help identify the cause for this. This is my js code for the custom button:
 
Javascript Code for the custom button:
{!requireScript("/soap/ajax/11.1/connection.js")}
try{
var userid = '{!User.Id}';
var username='{!User.Name}'; 
var userEmail='{!User.Email}'; 
var apprId='{!Fixture_Order__c.Approver_Name__c}';
var fixOrder='{!Fixture_Order__c.Id }'; 
var vtoemailid='BHN.fixtures@bhnetwork.com';


var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:2,ptoEmailid:vtoemailid,pisruntest:false}; 
var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args);

if(vCardKitsNeeded==1){
var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:3,ptoEmailid:vtoemailid,pisruntest:false}; 
var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args);
}

if(vMerchReq==1){
var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:4,ptoEmailid:vtoemailid,pisruntest:false}; 
var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args);
}

alert("The fixture order has been sent to BHN Fixtures.");

}catch(e)
 {
  alert("Send Email has failed. Please contact your system administrator with this screeshot or error message: "+e + "-" + e.message);
 }

 
  • September 04, 2008
  • Like
  • 0
Hi,
 
I need to override the standard edit page for a custom object. If the status of the custom object record is "Approved", then I do not want users to edit the record, else I need to redirect the users to the standard edit page for this record.
 
I have the following code in VF and controller. I can see the the URL is changed to the edit page URL when I click the edit button after overiding the button with the VF page, but the standard edit page is not getting displayed. Insatead the word Hello is getting displayed.
 
VF Code:
<apex:page standardController="Fixture_Order__c" extensions="conSEditOverrideFixtureOrder" 
id="mypage">
Hello
</apex:page>

 
Controller Code:
public class conSEditOverrideFixtureOrder {
Fixture_Order__c fixordobj; 

private String vid; 


public conSEditOverrideFixtureOrder(ApexPages.StandardController controller) { 

this.vid = ApexPages.currentPage().getParameters().get('id'); 
reset();

} 

public PageReference reset() { 

if(fixordobj.Approval_Status__c=='Approved'){
 PageReference editPage = new PageReference('/'+this.vid+'/e—retURL=' + this.vid);
 editPage.setRedirect(true);
 return editPage;
}else{
PageReference errPage = new PageReference('/apex/editFixtureOrderError');
 errPage.setRedirect(true);
 return errPage;
 
}

return null; 

} 

public String getApprovalStatus(){
 return this.fixordobj.Approval_Status__c;
}

public Fixture_Order__c getFixtureOrder() { 

if(fixordobj == null) reset(); 

return fixordobj; 

} 


public void setLead(Fixture_Order__c leaddet) { 

fixordobj = leaddet; 

} }

 

Can anyone please help to understand the cause? Appreciate all your valuable feedbacks.

Thanks and regards,
Ambili
  • September 02, 2008
  • Like
  • 0
Hi,
 
We have the following two custom objects:
1. Purchase_Orders and
2. purchase_items.
 
The object Purchase_Orders has a custom text field named "Approval Status". The requirement is that once the value of the field "Approval Status" is "Approved", users (except system administrators) SHOULD NOT be able to EDIT the record for both the purchase_order and the purchase_item. Until then they are allowed to edit the detail pages for these records.
 
What are the different options to enable this kind of functionality to disable "EDIT" based on certain criteria? Can we do this using any standard force.com functionalities?
 
Appreciate all your feedbacks on this.
Thanks and regards,
Ambili
 
P.S We cannot use the standard salesforce approval process due to some inherent restrictions, therefore cannot use its locking mechanism.)
 
  • August 27, 2008
  • Like
  • 0
Hi,
 
We have the following two custom objects:
1. Purchase_Orders and
2. purchase_items.
 
The object Purchase_Orders has a custom text field named "Approval Status". The requirement is that once the value of the field "Approval Status" is "Approved", users (except system administrators) SHOULD NOT be able to EDIT the record for both the purchase_order and the purchase_item. Until then they are allowed to edit the detail pages for these records.
 
What are the different options to enable this kind of functionality to disable "EDIT" based on certain criteria? Can we do this using any standard force.com functionalities?
 
Appreciate all your feedbacks on this.
Thanks and regards,
Ambili
 
P.S:(We cannot use the standard salesforce approval process due to some inherent restrictions, therefore cannot use its locking mechanism.)
 
  • August 27, 2008
  • Like
  • 0

Hi,

We have a custom print button that uses activeX for exporting a custom S-control report to excel. But when we click the export to excel button, it throws the following javascript error:

Invalid Procedure call or argument.

I have enabled all activeX setting under the internet options, but still it does not work on certain machines/laptops that has the same IE version. It works fine on my machine and some other similar machines that has the same IE version.

The VB script code that executes in the S-control when user clicks the custom "Export to Excel" button is this:

Code:
<script language="vbscript"> 

Sub expToExcel1

sHTML = document.all.item("exptmatrixdata").outerhtml

set Response.ContentType = "application/vnd.ms-excel"

Reponse.Write(sHTML)

End Sub


Sub expToExcel

Dim sHTML, oExcel, oBook 

sHTML = document.all.item("exptmatrixdata").outerhtml 

Set oExcel = CreateObject("Excel.Application") 

Set oBook = oExcel.Workbooks.Add 

oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML 

oBook.HTMLProject.RefreshDocument 

oExcel.Visible = true 

oExcel.UserControl = true

End Sub 

</script> 


 

Appreciate if anyone can give their feedback on this issue.

Thanks and regards,
Ambili

 

  • August 25, 2008
  • Like
  • 0
Hi,
 
We are using apex email services. I was able to add the apex generated emailid  as the replyto address in sandbox and it works fine. But when I try the same in production, it fails with following error:

INVALID_EMAIL_ADDRESS, Invalid replyTo address
 
Appreciate if you could kindly throw some light on this. I am unable to understand why it works in sandbox and NOT in production. Is there some other configuration missing? We need to set the from or reply to  or cc address to apex generated emaild ID when sending email from within salesforce, but currently none of these are working in production(but works in sandbox)
 
Thanks and regards,
Ambili
  • August 13, 2008
  • Like
  • 0
Hi,
 
When I invoke methodA from custom buttons and links as javascript at the object level, it correctly sends out email with the content from the referenced visualforce page(/apex/FixtureOrderInfoTempl). But when the same method is invoked from another Apex Class, it sends an empty content. I tried using try-catch, but there is no error.
 
   apexmethodA(){
               pageRef = new PageReference( '/apex/FixtureOrderInfoTempl' +'?id=' + pfixorderno );
     pageBody = pageRef.getContent().toString();
    //Set content to email body and sent email
   }
 
This is the difference that I see in the debug logs. The name of the visualforce page is FixtureOrderTempl
1. The debug log generated when the invokation is successful, when it is invoked directly from page layout:
 
Code:
<script  src="/js/ClientHash.js" type="text/javascript"></script><script  type="text/javascript">var hvch = ClientHash.prototype.needsClientHash('sid_Client', '0000000nHi300000005PpU', '65.208.210.99', '/servlet/servlet.ClientHashValidator—ResponseRequestedURL=%2Fapex%2FFixtureOrderTempl%3Fid%3Da0RR00000008eWc%26inline%3D1%26core.apexpages.devmode.url%3D1');
</script></head><body onLoad="if (this.bodyOnLoad) bodyOnLoad();" onBeforeUnload="if (this.bodyOnBeforeUnload) bodyOnBeforeUnload();" onUnload="if (this.bodyOnUnload) bodyOnUnload();" onFocus="if (this.bodyOnFocus) bodyOnFocus();" class="accountTab "><iframe title="blank - ignore" name="div_submit" id="div_submit" src="/s.gif" style="display:none;visibility:hidden;width:0px;height:0px" frameborder="0"></iframe>


 
2. The debug log from the failed invokation that generates a blank email body when the same method is invoked from an apex class:

Code:
<script>
if (window.location.replace){ 
window.location.replace('https://cs2.salesforce.com/—ec=302&startURL=%2Fapex%2FFixtureOrderTempl%3Finline%3D1%26core.apexpages.devmode.url%3D1%26id%3Da0RR00000008eWc');
} else {;
window.location.href ='https://cs2.salesforce.com/–ec=302&startURL=%2Fapex%2FFixtureOrderTempl%3Finline%3D1%26core.apexpages.devmode.url%3D1%26id%3Da0RR00000008eWc';
} 
</script>


 
Appreciate if anyone could highlight whats going strange here. Do we always need to call the above apexmethodA from a page-level and not from within a class?
Thanks
  • August 08, 2008
  • Like
  • 0
Hi,
I have got 100% coverage for this visualforce Controller Extension that I am trying to deploy to production. But when I try to deploy using ant, I get the following exception:
Code:
C:\workzone\Salesforce-ant\sample>ant -verbose deploy
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_06\jre
Detected OS: Windows XP
parsing buildfile C:\workzone\Salesforce-ant\sample\build.xml with URI = file:/C
:/workzone/Salesforce-ant/sample/build.xml
Project base dir set to: C:\workzone\Salesforce-ant\sample
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
 [property] Loading C:\workzone\Salesforce-ant\sample\build.properties
 [property] Loading Environment env.
Build sequence for target(s) `deploy' is [deploy]
Complete build sequence is [deploy, deployUnpackaged, probe-proxy, proxy, retrie
veUnpackaged, test, ]

deploy:
parsing buildfile jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.jar!/com/sale
sforce/antlib.xml with URI = jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.ja
r!/com/salesforce/antlib.xml
[sf:compileAndTest] compileAndTest on https://www.salesforce.com/services/Soap/u
/10.0, compiling 1 classes and 0 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failur
e

BUILD FAILED
C:\workzone\Salesforce-ant\sample\build.xml:45: Failed to login:UNKNOWN_EXCEPTIO
N: An error occurred on your page.
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:190)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurre
d on your page.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        ... 17 more
--- Nested Exception ---
com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurred on your p
age.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 1 second

 
The username, password and other proxy settings are all set correctly in the build.xml and build.properties file.
Would greatly appreciate if anyone can throw some light on this.
 
Thanks
  • August 08, 2008
  • Like
  • 0
Hi,
I have got 100% coverage for this visualforce Controller Extension that I am trying to deploy to production. But when I try to deploy using ant, I get the following exception:
Code:
C:\workzone\Salesforce-ant\sample>ant -verbose deploy
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_06\jre
Detected OS: Windows XP
parsing buildfile C:\workzone\Salesforce-ant\sample\build.xml with URI = file:/C
:/workzone/Salesforce-ant/sample/build.xml
Project base dir set to: C:\workzone\Salesforce-ant\sample
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
 [property] Loading C:\workzone\Salesforce-ant\sample\build.properties
 [property] Loading Environment env.
Build sequence for target(s) `deploy' is [deploy]
Complete build sequence is [deploy, deployUnpackaged, probe-proxy, proxy, retrie
veUnpackaged, test, ]

deploy:
parsing buildfile jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.jar!/com/sale
sforce/antlib.xml with URI = jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.ja
r!/com/salesforce/antlib.xml
[sf:compileAndTest] compileAndTest on https://www.salesforce.com/services/Soap/u
/10.0, compiling 1 classes and 0 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failur
e

BUILD FAILED
C:\workzone\Salesforce-ant\sample\build.xml:45: Failed to login:UNKNOWN_EXCEPTIO
N: An error occurred on your page.
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:190)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurre
d on your page.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        ... 17 more
--- Nested Exception ---
com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurred on your p
age.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 1 second

 
The username, password and other proxy settings are all set correctly in the build.xml and build.properties file.
Would greatly appreciate if anyone can throw some light on this.
 
Thanks
  • August 08, 2008
  • Like
  • 0
Hi,
 
When I invoke methodA from custom buttons and links as javascript at the object level, it correctly sends out email with the content from the referenced visualforce page(/apex/FixtureOrderInfoTempl). But when the same method is invoked from another Apex Class, it sends an empty content. I tried using try-catch, but there is no error.
 
   apexmethodA(){
               pageRef = new PageReference( '/apex/FixtureOrderInfoTempl' +'?id=' + pfixorderno );
     pageBody = pageRef.getContent().toString();
    //Set content to email body and sent email
   }
 
This is the difference that I see in the debug logs. The name of the visualforce page is FixtureOrderTempl
1. The debug log generated when the invokation is successful, when it is invoked directly from page layout:
Code:
<script  src="/js/ClientHash.js" type="text/javascript"></script><script  type="text/javascript">var hvch = ClientHash.prototype.needsClientHash('sid_Client', '0000000nHi300000005PpU', '65.208.210.99', '/servlet/servlet.ClientHashValidator—ResponseRequestedURL=%2Fapex%2FFixtureOrderTempl%3Fid%3Da0RR00000008eWc%26inline%3D1%26core.apexpages.devmode.url%3D1');
</script></head><body onLoad="if (this.bodyOnLoad) bodyOnLoad();" onBeforeUnload="if (this.bodyOnBeforeUnload) bodyOnBeforeUnload();" onUnload="if (this.bodyOnUnload) bodyOnUnload();" onFocus="if (this.bodyOnFocus) bodyOnFocus();" class="accountTab "><iframe title="blank - ignore" name="div_submit" id="div_submit" src="/s.gif" style="display:none;visibility:hidden;width:0px;height:0px" frameborder="0"></iframe>

 

2. The debug log from the failed invokation that generates a blank email body when the same method is invoked from an apex class:
Code:
<script>
if (window.location.replace){ 
window.location.replace('https://cs2.salesforce.com/—ec=302&startURL=%2Fapex%2FFixtureOrderTempl%3Finline%3D1%26core.apexpages.devmode.url%3D1%26id%3Da0RR00000008eWc');
} else {;
window.location.href ='https://cs2.salesforce.com/–ec=302&startURL=%2Fapex%2FFixtureOrderTempl%3Finline%3D1%26core.apexpages.devmode.url%3D1%26id%3Da0RR00000008eWc';
} 
</script>

 
      
 
Appreciate if anyone could highlight whats going strange here. Do we always need to call the above apexmethodA from a page-level and not from within a class?
Thanks


Message Edited by arasu on 08-06-2008 05:00 PM

Message Edited by arasu on 08-07-2008 06:09 PM
  • August 06, 2008
  • Like
  • 0
Hi,
 
We are encountering a very frustrating issue in our sandbox. This is the second time this incident has happened after we refreshed our sandbox(full) from production.
 
We refreshed and activated the sandbox on 7/28/2008 (i.e. couple of days back) and today i.e. 7/31/2008 at 12:18 Am, to our surprise it has switched back to the old version for no reason i.e. the version before the refresh. All the critical changes that we had implemented in sandbox after the refresh has vanished!
 
This is the second time it has happened consequently after we refreshed sandbox(full) from production.
Has anyone faced a similar issue in their org. Ours is an Enterprose Edition.
 
Would greatly appreciate if anyone from salesforce admin can please respond to this issue as we only have a basic support which does not help.
Please let me know if you need any other information.
 
Thanks and regards,
Ambili
  • July 31, 2008
  • Like
  • 0
Hi,
 
We are encountering a very frustrating issue in our sandbox. This is the second time this incident has happened after we refreshed our sandbox(full) from production.
 
We refreshed and activated the sandbox on 7/28/2008 (i.e. couple of days back) and today i.e. 7/31/2008 at 12:18 Am, to our surprise it has switched back to the old version for no reason i.e. the version before the refresh. All the critical changes that we had implemented in sandbox after the refresh has vanished!
 
This is the second time it has happened consequently after we refreshed sandbox(full) from production.
Has anyone faced a similar issue in their org. Ours is an Enterprose Edition.
 
Would greatly appreciate if anyone from salesforce admin can please respond to this issue as we only have a basic support which does not help.
Please let me know if you need any other information.
 
Thanks and regards,
Ambili
  • July 31, 2008
  • Like
  • 0
Hi,
 
Is it possible to add the "Voting" button (used in Microsoft outlook under email options) in an outbound email that is sent out from salesforce using Apex? We need this capability because the email that is being send out to user needs either "Approval" or "Rejection" as their response. Therefore having a voting button will grealy help with the usability.
 
Appreciate all your feedbacks on this.

Thanks and regards,
Ambili
  • July 30, 2008
  • Like
  • 0
Hi,

We have a requirement to implement approval process for a custom object. The aproval request will be initiated by the owner of the custom object and sent to user who may/may not have a salesforce user licese. Once the user approves the request, the approval status should trigger a field update on the same object.

We want to use the standard approval process available on the force.com platform but the approval requests will also be send to users who do not have a salesforce user license.
 
Is this possible using the standard approval process to send email to external users?
Or how can this be done using Apex?
 
We appreciate all your feedbacks.
Regards
  • July 23, 2008
  • Like
  • 0
Hi,
 
We recently purchased two different kinds of licenses from salesforce named "Salesforce Platform" and "Salesforce Platform Light". Users with the CRM license are having issues changing the account owner to someone who has one of the abovesaid licenses especially if the account has opportunities. This was not a problem when al users had the CRM/standard license.
 
Has anyone faced similar issues. Is there a workaround for users with these new licenses  which will help them transfer accounts?
 
Appreciate all your feedbacks.
Regards
  • July 23, 2008
  • Like
  • 0
Hi,
 
How can we format a custom number or text field to pad zeros (0) on the left of a 5-digit number.
For e.g: If user enters 346, then it should be saved and displayed as "00346".
 
Thanks and regards,
Ambili
  • January 21, 2008
  • Like
  • 1
Hi,
I want to write a query like this:

select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c='Allow Relationships To Be Created' and Account__r.Name not like 'Test%'.
 
The above query throws SOQL exception.
 
It works and runs when I remove the NOT operator as shown below:

select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c='Allow Relationships To Be Created' and Account__r.Name like 'Test%'
 
My questions is: Does SOQL support "NOT LIKE" operator. If no, then what is the alternative to achieve a similar operation.
 
Thanks for all your feedbacks.
Ambili
  • October 16, 2007
  • Like
  • 1
Hi Members....
                           I am thankful to all the members of this forum specially Rick Greenwald

This forum is helping a lot for the new users who started working on force.com platform.

Can any one please clarify:
Suppose i developed an organisation XYZ on the Salesforce.com and i have an existing web application ABC which is implemented using JSPs or PHP.

Suppose I want to embed XYZ in ABC then is it mean integrating  XYZ with ABC?

Please correct me if i am wrong.


If I insert a Lead with apex I don't always want the context user to be the owner of the lead created. Rather it should be processed by the assigment rules. Please tell me this is possible and I just overlooked it somewhere.

Thanks,
Jason
  • November 08, 2008
  • Like
  • 0
Hi,
 
We have the following visualforce page for new Lead that uses an ActionSupport tag. The functionality is to rerender the Street name field to auto-populate the information based on the postal code information entered. The issue is that the page does a validation before submitting the information to server when user enters the postal code; and the auto-population of street name fails. But if all the madatory information is entered in the VF lead page like (Lead name,Company,Street Number,etc) before the request is submittied with the postal code, then it works fine and populates the rest of the address.
 
We also tried using the "immediate"  attribute of actionSupport tag byt setting it to false like this, but in vain.
 
Please find the attached VF page and Controller. This is the snippet of VF code that is having issues:
 
Code:
            <apex:inputField value="{!lead.Postal_Code__c}" required="true" id="postal_code">           
                 <apex:actionSupport event="onblur"   action="{!addressAutoPop}"  reRender="sname" immediate="true" />
            </apex:inputField>            
             <apex:inputField id="snumber" value="{!lead.Street_Number__c}" required="true"/><b/>
                <apex:inputField id="sname" value="{!lead.Street_Name__c}" />           


 
Appreciate all your valuable feedbacks.

Thanks and regards
  • November 04, 2008
  • Like
  • 0

Hi,

 

Experienced salesforce.com administrator/developer available for freeelance/part-time job.

**Design and develop custom applications using the force.com platform

**S-controls, Visualforce and Apex (including triggers).

**Data and database issues.

**Quick turnaround time and can also provide 24X7 support for any issues after implementation.

**Rates are negotiable to fit within your budget.

If you have any questions, please email me at kgrasu@yahoo.com.

Thanks and regards,
Rasu

  • September 15, 2008
  • Like
  • 0
Hi,
 
I have a custom button that executes a javascript code when clicked. It works fine for all user profiles in production, but does not work in sandbox and throws the following error message:
 
[object Error]-sforce.apex is null or not an object
It works in sanbox only for administrator profile.

Appreciate is anyone can help identify the cause for this. This is my js code for the custom button:
 
Javascript Code for the custom button:
{!requireScript("/soap/ajax/11.1/connection.js")}
try{
var userid = '{!User.Id}';
var username='{!User.Name}'; 
var userEmail='{!User.Email}'; 
var apprId='{!Fixture_Order__c.Approver_Name__c}';
var fixOrder='{!Fixture_Order__c.Id }'; 
var vtoemailid='BHN.fixtures@bhnetwork.com';


var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:2,ptoEmailid:vtoemailid,pisruntest:false}; 
var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args);

if(vCardKitsNeeded==1){
var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:3,ptoEmailid:vtoemailid,pisruntest:false}; 
var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args);
}

if(vMerchReq==1){
var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:4,ptoEmailid:vtoemailid,pisruntest:false}; 
var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args);
}

alert("The fixture order has been sent to BHN Fixtures.");

}catch(e)
 {
  alert("Send Email has failed. Please contact your system administrator with this screeshot or error message: "+e + "-" + e.message);
 }

 
  • September 04, 2008
  • Like
  • 0
Hi,
 
I need to override the standard edit page for a custom object. If the status of the custom object record is "Approved", then I do not want users to edit the record, else I need to redirect the users to the standard edit page for this record.
 
I have the following code in VF and controller. I can see the the URL is changed to the edit page URL when I click the edit button after overiding the button with the VF page, but the standard edit page is not getting displayed. Insatead the word Hello is getting displayed.
 
VF Code:
<apex:page standardController="Fixture_Order__c" extensions="conSEditOverrideFixtureOrder" 
id="mypage">
Hello
</apex:page>

 
Controller Code:
public class conSEditOverrideFixtureOrder {
Fixture_Order__c fixordobj; 

private String vid; 


public conSEditOverrideFixtureOrder(ApexPages.StandardController controller) { 

this.vid = ApexPages.currentPage().getParameters().get('id'); 
reset();

} 

public PageReference reset() { 

if(fixordobj.Approval_Status__c=='Approved'){
 PageReference editPage = new PageReference('/'+this.vid+'/e—retURL=' + this.vid);
 editPage.setRedirect(true);
 return editPage;
}else{
PageReference errPage = new PageReference('/apex/editFixtureOrderError');
 errPage.setRedirect(true);
 return errPage;
 
}

return null; 

} 

public String getApprovalStatus(){
 return this.fixordobj.Approval_Status__c;
}

public Fixture_Order__c getFixtureOrder() { 

if(fixordobj == null) reset(); 

return fixordobj; 

} 


public void setLead(Fixture_Order__c leaddet) { 

fixordobj = leaddet; 

} }

 

Can anyone please help to understand the cause? Appreciate all your valuable feedbacks.

Thanks and regards,
Ambili
  • September 02, 2008
  • Like
  • 0
Hi,
 
We have the following two custom objects:
1. Purchase_Orders and
2. purchase_items.
 
The object Purchase_Orders has a custom text field named "Approval Status". The requirement is that once the value of the field "Approval Status" is "Approved", users (except system administrators) SHOULD NOT be able to EDIT the record for both the purchase_order and the purchase_item. Until then they are allowed to edit the detail pages for these records.
 
What are the different options to enable this kind of functionality to disable "EDIT" based on certain criteria? Can we do this using any standard force.com functionalities?
 
Appreciate all your feedbacks on this.
Thanks and regards,
Ambili
 
P.S:(We cannot use the standard salesforce approval process due to some inherent restrictions, therefore cannot use its locking mechanism.)
 
  • August 27, 2008
  • Like
  • 0
Hello everyone, just wanted to share with the community this custom component I made and give something back for the help I've received. :smileyhappy:

The purpose of the component is to enable autocomplete in lookup fields. I used the autocomplete js created by Jim Roos:
(http://www.jimroos.com/2007/05/ajax-autocomplete.html) but made some modifications to it so that it could interact with an Apex controller among some other things...

So my idea was that if you were making a VF page that had an inputfield that was related to a lookupfield you would just insert this autocomplete component to that inputfield. Something like this:

Code:
           <apex:inputField value="{!Contact.accountid}" id="accname" styleClass="cField">
<c:autocomplete ObjectName="Accounts" InputId="{!$Component.accname}" AutoCompleteId="accACid" ClassName="autocomplete300"/>
</apex:inputField>

The component has 4 parameters:

The name of the object or custom object that the inputfield relates to (new objects must be added inside the apex classes since i had some problems constructing a dynamic query).
The InputId which is used to relate the component to the input field
The id for the Component
A classname parameter that basically just defines the width of the suggestions menu.

Here's a screenshot of how it looks like in action:




Here's a link to the file containing the required files:

AutoCompleteComponent



Jonathan.


Message Edited by jonathan rico on 08-16-2008 01:55 PM

Message Edited by jonathan rico on 08-17-2008 09:04 AM
Message Edited by jonathan rico on 01-02-2010 05:01 PM
Hi,
 
We are using apex email services. I was able to add the apex generated emailid  as the replyto address in sandbox and it works fine. But when I try the same in production, it fails with following error:

INVALID_EMAIL_ADDRESS, Invalid replyTo address
 
Appreciate if you could kindly throw some light on this. I am unable to understand why it works in sandbox and NOT in production. Is there some other configuration missing? We need to set the from or reply to  or cc address to apex generated emaild ID when sending email from within salesforce, but currently none of these are working in production(but works in sandbox)
 
Thanks and regards,
Ambili
  • August 13, 2008
  • Like
  • 0
Hi,
I have got 100% coverage for this visualforce Controller Extension that I am trying to deploy to production. But when I try to deploy using ant, I get the following exception:
Code:
C:\workzone\Salesforce-ant\sample>ant -verbose deploy
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_06\jre
Detected OS: Windows XP
parsing buildfile C:\workzone\Salesforce-ant\sample\build.xml with URI = file:/C
:/workzone/Salesforce-ant/sample/build.xml
Project base dir set to: C:\workzone\Salesforce-ant\sample
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
 [property] Loading C:\workzone\Salesforce-ant\sample\build.properties
 [property] Loading Environment env.
Build sequence for target(s) `deploy' is [deploy]
Complete build sequence is [deploy, deployUnpackaged, probe-proxy, proxy, retrie
veUnpackaged, test, ]

deploy:
parsing buildfile jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.jar!/com/sale
sforce/antlib.xml with URI = jar:file:/C:/apache-ant-1.7.0/lib/ant-salesforce.ja
r!/com/salesforce/antlib.xml
[sf:compileAndTest] compileAndTest on https://www.salesforce.com/services/Soap/u
/10.0, compiling 1 classes and 0 triggers, deleting 0 classes and 0 triggers
[sf:compileAndTest] note: use ant -verbose to get more information on the failur
e

BUILD FAILED
C:\workzone\Salesforce-ant\sample\build.xml:45: Failed to login:UNKNOWN_EXCEPTIO
N: An error occurred on your page.
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:190)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurre
d on your page.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        ... 17 more
--- Nested Exception ---
com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An error occurred on your p
age.
        at com.sforce.ws.transport.SoapConnection.createException(SoapConnection
.java:168)
        at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:11
2)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92)
        at com.sforce.soap.apex.SoapConnection.compileAndTest(SoapConnection.jav
a:150)
        at com.salesforce.ant.CompileAndTest.execute(CompileAndTest.java:132)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 1 second

 
The username, password and other proxy settings are all set correctly in the build.xml and build.properties file.
Would greatly appreciate if anyone can throw some light on this.
 
Thanks
  • August 08, 2008
  • Like
  • 0
Hi,
 
We are encountering a very frustrating issue in our sandbox. This is the second time this incident has happened after we refreshed our sandbox(full) from production.
 
We refreshed and activated the sandbox on 7/28/2008 (i.e. couple of days back) and today i.e. 7/31/2008 at 12:18 Am, to our surprise it has switched back to the old version for no reason i.e. the version before the refresh. All the critical changes that we had implemented in sandbox after the refresh has vanished!
 
This is the second time it has happened consequently after we refreshed sandbox(full) from production.
Has anyone faced a similar issue in their org. Ours is an Enterprose Edition.
 
Would greatly appreciate if anyone from salesforce admin can please respond to this issue as we only have a basic support which does not help.
Please let me know if you need any other information.
 
Thanks and regards,
Ambili
  • July 31, 2008
  • Like
  • 0

Hi,

I have an S-control that invokes an apex program. It is working perfectly fine when I login as users with System Administrator profile. But when I login as users with any other profiles, it thows the following error:

e is:{faultcode:'sf:INSIFFICIENT_ACCESS',faultstring:'HnadlerDiscontinueUPC: no access allowed to this class.',}

I went to the specific user profile and granted "Apex Only User" permission , but it still did not work.

Appreciate if anyone has any feedback on this issue.
Thanks and regards,
Ambili

  • June 28, 2008
  • Like
  • 0
I would like to create a similar page to the standard one for sending emails in Visualforce. The idea is to be able to pre-propulate the email page with the template defined for Solution and capture the Send action to change Case status to "Solution provided to customer". I don't know how to read the template and show it with the merge fields replaced by their value, is there a standard way to do this?
Hi,

I want to send outbound emails whose reply to address is the email address generated by Force.com Email Services.
When recipients reply, I want to process these reply mails with my apex class.
However, if I set the address generated by Force.com Email Services as replyTo, sendEmail method fails.
The error message is as follows.

SendEmail failed. First exception on row 0; first error: INVALID_EMAIL_ADDRESS, Invalid replyTo address : (the mail address genereated by Force.com Email Services)


Why is the address of Force.com Email Services invalid?
I am trying to create new case with couple of pre-populated fields.  I tried custom link that works only as a detail button on  a Case.
 
I would like to create a list button that overrides NEW button on Case Home Page.
 
Could  somebody share s-control that will help me or give me some pointers to accomplish this.
 
Thankyou very much.
I need to have a lookup field on Activity /event page, as of now this functionality is not available.   can anybody suggest an alternative  to tag an ID for contact that I select on event?  each contact can have multiple ID's  and there are several contacts for each account.   I can't use picklist for contact Id because the total unique Id's  are more than 10,000.
 
A custom lookup field would have solved my problem...
 
I appreciate your input...
 
 
 
 
 
 
  • December 02, 2006
  • Like
  • 0
I am getting an Invalid_Status error, so I'm assuming it is being feed the wrong value. This is what I feed to it.

select Id,MasterLabel from Lead where isConverted=true (java api example)

Id MasterLabel
00000x0000SomeUniqueId1 Label1
00000x0000SomeUniqueId2 Label2

So I feed it Label1, but it returns back as Invalid Status, what table should I be looking at?

Please help! Thank you!

EDIT: API 5.0, Java

Message Edited by fredericksiu on 03-09-2005 10:17 AM