• Santhosh Kumar
  • NEWBIE
  • 195 Points
  • Member since 2011

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 95
    Replies

Hi,

 

I am trying to integrate Salesforce with SAP ABAP using Web Services.

I created a Client Proxy in ABAP with the Enterprise WSDL file available from developerforce.

But the generated Data Types have some complex data types( recursive tructures)

hence do not get activated but instead throw errors.

Is there any way I can solve this issue?

 

Regards

Suzie

  • August 17, 2012
  • Like
  • 0

Hi guys

 

I just want to make sure I understand there is no way around it except using VisualForce.

 

I have an Employee object, with a field for First Name, a field for Last Name, a field for Middle Name.  And then I have the standard Name field (which I renamed to Employee Id) which is an auto-generated number.  (I wish to use the standard Name field to store the employee names but standard Name field is at most only 80 characters long, which can sometimes present challenges for names.)

 

I have some other objects that have lookup to Employee.  In those edit forms, when I click the lookup icon, the lookup screen displays Employee Id.  I know I can tailor the page so it'll also show Last Name, First Name, Middle Name.  But I can only choose the employee by clicking the Employee Id, and when the lookup icon closes, it is the Employee Id that is displayed in the original form (from which the lookup window is called).  

 

1. Is there any way that, instead of showing Employee Id, that I show the Employee Name (which is a formula field in the Employee object)? (without using Visualforce that is)

 

2. I really was hoping I could make the Employee object to work like the standard Contact object, so that when you're in the edit form, the name is split into FIrst Name/Last Name fields, but when you display the Employee record in detail form it shows as one field.  Has anyone successfully implemented an Employee object like a Contact object?

 

Thanks

 

having problem in chart because i have used array so it shows me 1 record at 1 time through vf page. but i want to show all the records if any one can help me in this

this is my code

Visualforce page:

 

<apex:page controller="WasteSplit" sidebar="false">
<!-- Google API inclusion -->
<apex:includeScript id="a" value="https://www.google.com/jsapi" />
<apex:sectionHeader title="Google Charts" subtitle="Chart 2"/>

<!-- Google Charts will be drawn in this DIV -->

<div id="chartBlock" />

<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});

// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(initCharts);

function initCharts() {
WasteSplit.WasteSource(
function(result, event){
// load Column chart
var visualization = new google.visualization.PieChart(document.getElementById('chartBlock'));
var finalBean=result[0];
// Prepare table model for chart with columns
var data = new google.visualization.arrayToDataTable([
['Cases','Success Rate'],
['Total Waste',finalBean.wastetype]

]);
// add rows from the remoting results


// all done, lets draw the chart with some options to make it look nice.
var opt={title:[finalBean.WasteName],pieSliceText:['value']};
visualization.draw(data,opt);
},{escape:true});
}
</script>
</apex:page>

=========================================================================

controller class:

global with sharing class WasteSplit{

@RemoteAction
global static WasteSplitt[] WasteSource(){

Map<String,Integer> countMap = new Map<String,Integer>();
List<Service__c> sList = [select Name,Waste_Type2__c,s.Customer__r.Grand_Parent_Account__c,Status__c
from Service__c s where Status__c = 'Active' and Waste_Type2__c!=null];
system.debug('========sList======'+sList);
for(Service__c sr: sList){
ID parentAccountId=sr.Customer__r.Grand_Parent_Account__c;
if(countMap.get(sr.Waste_Type2__c)==null)
{
countMap.put(sr.Waste_Type2__c,1);

}
else
{
integer cnt=countMap.get(sr.Waste_Type2__c);
countMap.put(sr.Waste_Type2__c,cnt+1);

}


}

WasteSplitt[] SplitList = new WasteSplitt[countmap.size()];
system.debug('========splitlist======'+splitlist);
Integer i=0;
for(String WasteTypeField : countMap.keySet()){
system.debug('========countMap.keySet()======'+countMap.keySet());
system.debug('========WasteTypeField======'+WasteTypeField);
WasteSplitt beanObj=new WasteSplitt(WasteTypeField,countMap.get(WasteTypeField));
system.debug('========beanObj======'+beanObj);
SplitList[i]=beanObj;
i++;
}
system.debug('========SplitList======'+SplitList);
return SplitList;
}

global class WasteSplitt{
public String WasteName{get;set;}
public Integer wastetype{get;set;}

public WasteSplitt(String wastename,Integer waste){
this.WasteName=wastename;
this.wastetype = waste;

}
public WasteSplitt(){

}
}
}

 

 

Debug shows all the values but in chart it shows only 1st  value becuase of this in vf page var finalBean=result[0];

========SplitList======(WasteSplitt:[WasteName=Cardboard Stickers, wastetype=86], WasteSplitt:[WasteName=Dry Mixed Recycling, wastetype=1135], WasteSplitt:[WasteName=Electrical, wastetype=49], WasteSplitt:[WasteName=Brake fluid, wastetype=5], WasteSplitt:[WasteName=Clinical, wastetype=1], WasteSplitt:[WasteName=Food, wastetype=21]

 

thanks for ur time....:)

  • August 14, 2012
  • Like
  • 0

Hi guys

 

Just want to know if you guys have any preference as to when to use Text as the record name and when to use Auto Number?  The limitations that I see of Text is that 1) it can be at most 80 characters long, and 2) Salesforce doesn't guarante uniqueness of the field.

 

However, if I use Auto Number, then I have some other problems.

 

For example, let's say I have an object called Work Unit, and because the text can be over 80 characters long, I use Auto Number as the record name, and then create a field called Description.

 

I have another object called Sub Work Unit that points to Work Unit.  When I fill out the edit form for Sub Work Unit, I can't type the Work Unit's description to do a lookup, I can only type the auto-number of the Work Unit in order to do a lookup and that is causing me a lot of pain.  What am I doing wrong?

 

Any suggestion is greatly appreciated.

 

Thanks!

I'm confused by all the jargon around portals: customer portal, sites, vendor portal, siteforce, etc.

  • I want to have an authenticated portal.  Each user will have their own license.
  • Portal users will also be Contacts - I know how to create user accounts from contacts.
  • Also, I want portal users to be able to work with custom objects (and their layouts) I've created, but only have access to the records that are descendents (children or grand-children) of the User's Account. 

1) What kind of portal should I use?  

 

2) Are there any applicable examples of sharing rules or sharing reasons to accomplish my requirement?

 

3) Any other advice?

 

Thanks so much!

 

Hi guys

 

As per subject.

 

I've seen people begging for help because they want to add notes and attachments only after objects have been created.

 

Am just curious why Salesforce can't let you add notes and attachments after objects are created?

 

I can see that for myself, for sure whenever I create objects I will make sure i check that checkbox.  But if I'm coming into the middle of a project when objects have already been created without having checked this checkbox, then what do I do?

 

Thanks

King

Does anyone know how I can get a listing of all objects taht are "replicated objects"... ?

 

Thanks!!!

 

Fred

  • September 15, 2011
  • Like
  • 0

When an agent emulates other portal user via "Login as Portal User", is there any way to get the agent's info in the portal context? 

 

For example, when agent Smith logins in as portal user Joe, is it possible to get the agent Smith's info in the code?

 

Appreciate your response.

The ListMetadata API returns the list of components of various types including custom and standard objects. One of the field included in the response is LastModifiedDate. This date seems to reflect the correct value for custom objects but for standard objects, this seems always be 1970 ish. 

 

Do you have any information about why it is so or any other mechanism we can findout Standard object's metadata has been updated?

 

Thank you.

I have been using Salesforce for a while and I really wish Salesforce invests good amount to improve the developer tools. While using the Force.com Explorer, I left to wish for more features and clean/easy interface. Had a thought to fill that void and developed the Real Force Explorer (all the pun intended :) ).

 

Here are the main features (as of yet)

 

  • Manage multiple Salesforce connections and save password encrypted using master password
  • View the objects (standard, custom, customsettings, history and share objects), its fields, record types
  • View the object's Child (this is a huge plus as in website you can view only the parent relationships) and Parent relationships
  • Search for object
  • Navigate from one object details to another object if there is a relation
  • Generate soql query to view object data (all, standard, custom, most or selected fields)
  • Execute soql using non-blocking execution which you can cancel anytime
  • Execute the soql with bind variables and tool would prompt you to enter values for bind variables
  • View and reexecute Soql execution history
  • View the soql results in Single row mode 
  • Explort the soql results into csv, xml, html and text formats
  • More features are on the way

Thanks in advance for your time to check the tool out. Let me know what worked and what didn't. You can log a feature request if you think it would be useful.

 

https://bitbucket.org/brsanthu/real-force-explorer/wiki/Home

 

Hi,

 

When a user tries to login in to salesforce every time , password should expire and ask  new password  , 

 

this is my requirement how can i achieve this in salesforce.

please replay

 

 

Regards,

sarvesh.

I am trying to roll up the Name field of a custom object (Study__c) to a field (Protocol__c) on its parent object (Opportunity). If there is more than one study the protocol field should have the text "MultiProt" but if there is only one study on the opportunity the protocol field should be populated by the name of the study.

 

Right now the code succesfully populates the field with multiprot if there is more than one study but wont do anything if there is only one study. I cant seem to find where my error is.

 

Any help would be greatly appreciated, thank you.

 

trigger ProtocallRollUp on Study__c (before insert, after update, after delete)
{
    study__c[] newst = trigger.new;    
    Set<Id> oppSet = new Set<Id>();
        for(Study__c p : newst ){
            oppSet.add(p.Opportunity__c);
        }


    List<Opportunity> oppList;
    
    try
    {
        Map<Id,Opportunity> oppMap = new Map<Id,Opportunity>();
        Map<Id,Opportunity> toBeUpdated = new Map<Id,Opportunity>();

         
        for (Opportunity o : (oppList = [SELECT id,protocol_number__c from Opportunity where id IN:oppSet]))
        {
            oppMap = new Map<ID, Opportunity>(oppList);
                 
                List<Study__c> studyRslts = [SELECT ID, Opportunity__c, Name 
                    FROM Study__c 
                    Where Opportunity__c =:o.Id];
                    if (studyRslts!=null && studyRslts.size()>1)
                    {
                        
						
                        Opportunity parentOpp = oppMap.get(String.valueOf('Opportunity__c'));
                        parentOpp.Protocol_number__c = 'MultiProt';
                        
                        oppMap.put(parentOpp.Id,parentOpp);
                       
                    }
					else if (studyRslts!=null && studyRslts.size()==1)
					{
                        for(Study__c s : studyRslts)
                        {
						Opportunity parentOpp = oppMap.get(String.valueOf('Opportunity__c'));
                        parentOpp.Protocol_number__c = s.Name;
						
						oppMap.put(parentOpp.Id,parentOpp);
                        }
					}
                    
        }             
            /*if(oppMap.values().size()>0)
                {
                    toBeUpdated.putAll(oppMap);
                }
            
            else
            {
                
            }
                 
        if(toBeUpdated != null && toBeUpdated.size()>0)
        {
            update toBeUpdated.values();
        }
        else
        {*/
            if(oppMap.values().size()>0)
            {
                update oppMap.values();
            }
        //}
         
        
    
    }
    catch (Exception e) 
    {
        System.debug('\n\n>> OpportunityUpdate - Unable to update Opportunity__c.\nException encountered ' + e.getMessage());
    } //Catch
}

 

  • August 16, 2013
  • Like
  • 0

Hi

 

I have an XML file with data and an XSL file. Is there any way I can upload these files and then render the XML data through the XSL file using Salesforce?

 

 

Thanks

Ross

I am using a dynamic SOQL search (using "Database.query") in an apex class that i'm using as the controller for a visualforce page. The fields that are searched do not change.

 

When I search for a value that exists in Contact.Name or Account.Name (indexed fields), the results appear in under 3 seconds. However when I search for a value that exists in an External ID text field (which as I understand, should also be indexed), the results take closer to 30 seconds. Subsequent testing has shown that whenever I use non-indexed fields the search time is around 30 seconds.

 

Is there any reason why an External ID text field wouldn't be indexed? Is there any way around it? I am currently looking into using SOSL instead of (or in addition to) SOQL, but have not yet found a sufficient solution.

I want to know Hirerchy of the Apex class ?

like   what is most super , sub class , like that .........

Hello there,

I am getting the following very peculiar and non-obvious error:

Using Springsource 3.3.0 and Force.com iDE v28, when I am trying to save to server the Case.object, the saving action is completed without errors, but what I am getting back is the following xm file, which is extremely different that the initial I was trying to save:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"/>

The initial xml file I was trying to save is a regular metadata xml file describing all fields, record types... e.t.c. of the Case object.
Of course nothing is changed in the organisation to which I am trying to save the object.



Can someone please help me with that, cause I have absolutely on idea what to do and it is really urgent.
Thanks in advance.




Hi All pardon my ignorance but im really new to java so there may be an obvious answer to this. Im trying to consume that salesforce enterprise wsdl to access a method that ive written in salesforce. I created a java aplication then selected new web service client. All seems to be going ok then i get this :

 


[WARNING] src-resolve: Cannot resolve the name 'ens:sObject' to a(n) 'type definition' component.
  line 12766 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl#types?schema2

[ERROR] A class/interface with the same name "javawsdlimporttest.Ayout" is already in use. Use a class customization to resolve this conflict.
  line 13912 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] (Relevant to above error) another "Ayout" is generated from here.
  line 13537 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 13912 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] (Related to above error) This is the other declaration.   
  line 13537 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 9391 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] (Related to above error) This is the other declaration.   
  line 9387 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 9392 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

[ERROR] (Related to above error) This is the other declaration.   
  line 9388 of file:/Users/mickmurphy/NetBeansProjects/JavaWSDLImportTest/xml-resources/web-service-references/enterprise/wsdl/enterprise.wsdl

Has anyone had this before and if so what did you do to resolved the problem? Any help would be much appreciated.

 

Thanks.

We have three java web applications running on weblogic server in three different domains. we have the context path as "/" for each of the three apps (eg: http://IP:port/). Now we have a requirement to move all the three apps in to a single

weblogic domain (will have the same port for all three apps), this forced us to define context path for each of the three

apps instead of "/". But when we run our app with context-path i.e as as http://IP:port/context-path then our script files, images are not loading up.

 

All our UI files are xsl/xml files.

 

Below are sample definitions in our xsl files

<scriptlanguage="javascript" src="/common/genericfunc.inc"></script>
<scriptlanguage="javascript" src="/common/menufunc.inc"></script>
<scriptlanguage="javascript" src="/common/framefunc.inc"></script>

 

But they are loading if we prepend context path i.e as

<scriptlanguage="javascript" src="(context-path)/common/genericfunc.inc"></script>
<scriptlanguage="javascript" src="(context-path)/common/menufunc.inc"></script>
<scriptlanguage="javascript" src="(context-path)/common/framefunc.inc"></script>

 

But adding it the above way will result in each and every file change in all our three apps.

Is there any other way to fix with out modifying all the files.

 

We have a custom object which has an embedded VF Page on it. This object is available on Customer Portal. When one of the buttons is pressed by the CP user, an email should go out. When I am logged into SF (not customer portal), this button works fine. However, when I am logged into Customer Portal the email does not work. The email is sent using Apex code. 

 

Is there something special I have to do to email someone from within the CP. 

 

public void sendDeclineEmail() {
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { 
            composeSingleEmailMessage(
                'tchrisbaker@gmail.com', null, null, 
                null, 'Test', 
                'test', 'test'
            )
        });
    }

 

 

 

private static Messaging.SingleEmailMessage composeSingleEmailMessage(
            string toAddress, string ccAddress, string replyToEmail, 
            string senderDisplayName, string subject, 
            string plainTextBody, string htmlBody
    ) {
        // Now create a new single email message object 
        // that will send out a single email to the addresses in the To, CC & BCC list. 
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        
        if(!DI_Helper.isValidEmail(toAddress)) {
            return mail;
        }
        
        // First, reserve email capacity for the current Apex transaction to ensure 
        // that we won't exceed our daily email limits when sending email after 
        // the current transaction is committed.
        integer numberOfEmails = 1;
        if(DI_Helper.isValidEmail(ccAddress)) {
            numberOfEmails++;
        }
        Messaging.reserveSingleEmailCapacity(numberOfEmails);
        
        // Processes and actions involved in the Apex transaction occur next, 
        // which conclude with sending a single email. 
        
        
        // Strings to hold the email addresses to which you are sending the email. 
        String[] toAddresses = new String[] {toAddress}; 
        String[] ccAddresses;
        if(numberOfEmails > 1) {
            ccAddresses = new String[] {ccAddress};
        }
          
        // Assign the addresses for the To and CC lists to the mail object. 
        mail.setToAddresses(toAddresses);
        mail.setCcAddresses(ccAddresses);
        
        // Specify the address used when the recipients reply to the email.  
        if(DI_Helper.isValidEmail(replyToEmail)) {
            mail.setReplyTo(replyToEmail);
        }
        
        // Specify the name used as the display name. 
        if(senderDisplayName != null && senderDisplayName.length() > 0) {
            mail.setSenderDisplayName(senderDisplayName);
        }
        
        // Specify the subject line for your email address.
        if(subject != null && subject.length() > 0) {
            mail.setSubject(subject);
        }
        
        // Set to True if you want to BCC yourself on the email. 
        //mail.setBccSender(false);
        
        // Optionally append the salesforce.com email signature to the email. 
        // The email address of the user executing the Apex Code will be used. 
        //mail.setUseSignature(false);
        
        // Specify the text content of the email.
        if(plainTextBody != null && plainTextBody.length() > 0) {
            mail.setPlainTextBody(plainTextBody);
        }
        if(htmlBody != null && htmlBody.length() > 0) {
            mail.setHtmlBody(htmlBody);
        }
        
        return mail;
    }

 

I had a problem where my trigger was calling a class twice. To avoid the class from being called twice, i have created a Boolean Field is_class-called__c on the Object and setting it to 'True' in the trigger. This solves my problem for now, but I can sense some unforseen situations when the class won't be called when it should be because the flag is not reset to 'False'

How can i reset the flag to false?

 

 if( trigger.isUpdate ){
                
       
        list<Record__c> rs = new list<Record__c>(); 
        rs = trigger.new;
        
        for( Record__c r :rs){
            
	        if( r.Status__c == 'Assigned'  && r.Date__c==Date.today() && r.is_class_called__c == false ){
	            
	            
	            class.callMethod(r.Id, r.Status__c, UserInfo.getUserId(), 'New');
	            
	            
	           r.is_class_called__c  = true;
	        
	        } 
	      
	    
        }

 

 

  • August 17, 2012
  • Like
  • 0

Force.com Web Service API Developer's Guide

 

To use the API, your organization must use Enterprise Edition, Unlimited Edition, or Developer Edition. If you are an
existing Salesforce.com customer and want to upgrade to either Enterprise or Unlimited Edition, contact your account
representative.

 

I trial a Salesforce Professional Edition. Some apps I can integrated but others can not. If I want to develop an App that can be used in all editions of Salesforces, what api should I use and how should I with it?

 

Anyone let me know this.

I am trying to query Radian6 Service Persona object from SOQL Explorer. I see the object, but i dont see any records when i query. What am i missing?

 

Regards

Shuchi

Hi guys

 

I just want to make sure I understand there is no way around it except using VisualForce.

 

I have an Employee object, with a field for First Name, a field for Last Name, a field for Middle Name.  And then I have the standard Name field (which I renamed to Employee Id) which is an auto-generated number.  (I wish to use the standard Name field to store the employee names but standard Name field is at most only 80 characters long, which can sometimes present challenges for names.)

 

I have some other objects that have lookup to Employee.  In those edit forms, when I click the lookup icon, the lookup screen displays Employee Id.  I know I can tailor the page so it'll also show Last Name, First Name, Middle Name.  But I can only choose the employee by clicking the Employee Id, and when the lookup icon closes, it is the Employee Id that is displayed in the original form (from which the lookup window is called).  

 

1. Is there any way that, instead of showing Employee Id, that I show the Employee Name (which is a formula field in the Employee object)? (without using Visualforce that is)

 

2. I really was hoping I could make the Employee object to work like the standard Contact object, so that when you're in the edit form, the name is split into FIrst Name/Last Name fields, but when you display the Employee record in detail form it shows as one field.  Has anyone successfully implemented an Employee object like a Contact object?

 

Thanks

 

Hi  guyz,

i wanna call a javascript method written in a js file on a custom button button click but m not able to add my javascript file. I have included the javascript file in the static resources. But can anyone help me how i can add the static resources on the click of the custom button. 

Any help would be highly appreciated ... 

 

 

Hi,

 

Can anybody give me an idea on how can I disable a custom link. I created a custom link in the opportunity page.

I want this link enabled based on a condition.

 

something like:

 

IF (Opportunity Type == New Service, link enabled, link disabled)

 

Thanks,

Del

 

Hello friends,

 

I was searching for the provision to pass the dynamic parameter in file "process-conf.xml".

For example - Log file locations, Export data file etc.

 

I am planning to take the complete salesforce data backup wickly with the help of DataLoader and path should automatically change like "Date Name". Every export files should go in different folder organized by date name.

 

 

 

Would like to check  whether is there any preferred/recommended  testing tool that can be best suited for SFDC(Salesforce) application for Test automation or can we use any tool(eg. QTP/Rational) to do that.

 

 

The Automation test that we refer hear is aimed to decrease the Duration of execution and can include below Test Automation Frameworks.
 -Creation of small,independent scripts that represent the modules are then used to construct larger tests to realize specific business scenarios.
 -Data driven tests that read input values from CSV/Excel files that can be used in the coded scripts for creation of objects like Contacts/Accounts etc.

 

Regards

Gopi chand P

  • August 16, 2012
  • Like
  • 0

Hi All,

 

Now i finished my one year in my company and also my Dev 401 certification ,I have much experience in salesforce trigger classes,visualforce page.

 

i plainning to prepare my resume but i dont have any idea how to prepare and what content i need to put in that ,and i dont have any model resume

 

please post some model resume that should be the salesforce experence person,or give some suggestion,or send this mail id ssaravananbtech@gmail.com

  • August 15, 2012
  • Like
  • 0

Hi,



I created two methods in this class but when saved generates this error message. "Save Error: Entity is not org-accessible"

 

Is a test method. I'm using isTest(SeeAllData=true) annotation.

 

So happens when I try to add two more methods class.

Anyone know what can be?

 

 

Regards,

 

Diego Moreira