• Force.com
  • NEWBIE
  • 330 Points
  • Member since 2010

  • Chatter
    Feed
  • 9
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 71
    Questions
  • 99
    Replies
When we enable "Enable clickjack protection for customer Visualforce pages with standard headers" & "Enable clickjack protection for customer Visualforce pages with headers disabled", the Visualforce Page which is overridden the Case (in fact, any object) Edit button/link doesn't work. It just displays blank screen.

Not just edit/new button/link, but any custom component in the Console doesn't work.

As per the Winter'17 release notes - "You can now embed custom Visualforce pages in the Service Console even when clickjack protection is enabled for Visualforce pages. Previously, if you wanted to use Visualforce pages in the Service Console, you needed to disable clickjack protection for all Visualforce pages." --- THIS STILL DOESN"T WORK.


--
Regards,
Abhilash.

 
I would like to consume salesforce web services via REST Api and I need Api description in any of those formats to generate a client.
So far I only find some none official incomplete examples
  https://github.com/paypal/wadl-library/blob/master/salesforce/salesforce-wadl.xml - incomplete
  or https://anypoint.mulesoft.com/apiplatform/popular#/portals/apis/8111/versions/8305 - does not work actually
and https://www.salesforce.com/us/developer/docs/api_rest/Content/resources_list.htm but it's not something that can be used by any of known tools.
As far as I understand salesforce does not support those formats (maybe they have plans to support them?) but maybe I am missing somethng.
Does anybody know any other sources?
 

Hi,

 

In Service Console, I have created a custom button in lead detail page. On click of that button, I need to open a Service Console subtab(passing the lead Id). Please let me know how to achieve this. I dont know much about Service Cloud.

Its very urgent, so a immediate response is very very helpful to me.  Thanks a lot.

 

--Jaya.

Hi, 

 

I am trying to invoke Swipe Clock, an external server through SOAP from Salesforce. I have generated apex class from wsdl file. Generated class is :

//Generated by wsdl2apex

public class mc2csComScci {
    public class AddEmployee_element {
        public String employeeCode;
        public String lastName;
        public String firstName;
        public String middleName;
        public String designation;
        public String title;
        public String ssn;
        public String dept;
        public String location;
        public String supervisor;
        public String startDate;
        public String endDate;
        public Integer lunch;
        public Double lunchHours;
        public Decimal payRate0;
        public Decimal payRate1;
        public Decimal payRate2;
        public Decimal payRate3;
        public String cardnum1;
        public String cardNum2;
        public String cardNum3;
        public String password;
        public String options;
        public String home1;
        public String home2;
        public String home3;
        public String schedule;
        public Integer exportBlock;
        private String[] employeeCode_type_info = new String[]{'employeeCode','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] lastName_type_info = new String[]{'lastName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] firstName_type_info = new String[]{'firstName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] middleName_type_info = new String[]{'middleName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] designation_type_info = new String[]{'designation','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] title_type_info = new String[]{'title','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] ssn_type_info = new String[]{'ssn','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] dept_type_info = new String[]{'dept','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] location_type_info = new String[]{'location','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] supervisor_type_info = new String[]{'supervisor','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] startDate_type_info = new String[]{'startDate','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] endDate_type_info = new String[]{'endDate','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] lunch_type_info = new String[]{'lunch','http://www.w3.org/2001/XMLSchema','int','1','1','false'};
        private String[] lunchHours_type_info = new String[]{'lunchHours','http://www.w3.org/2001/XMLSchema','float','1','1','false'};
        private String[] payRate0_type_info = new String[]{'payRate0','http://www.w3.org/2001/XMLSchema','decimal','1','1','false'};
        private String[] payRate1_type_info = new String[]{'payRate1','http://www.w3.org/2001/XMLSchema','decimal','1','1','false'};
        private String[] payRate2_type_info = new String[]{'payRate2','http://www.w3.org/2001/XMLSchema','decimal','1','1','false'};
        private String[] payRate3_type_info = new String[]{'payRate3','http://www.w3.org/2001/XMLSchema','decimal','1','1','false'};
        private String[] cardnum1_type_info = new String[]{'cardnum1','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] cardNum2_type_info = new String[]{'cardNum2','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] cardNum3_type_info = new String[]{'cardNum3','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] password_type_info = new String[]{'password','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] options_type_info = new String[]{'options','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] home1_type_info = new String[]{'home1','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] home2_type_info = new String[]{'home2','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] home3_type_info = new String[]{'home3','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] schedule_type_info = new String[]{'schedule','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] exportBlock_type_info = new String[]{'exportBlock','http://www.w3.org/2001/XMLSchema','int','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'https://mc2cs.com/scci','true','false'};
        private String[] field_order_type_info = new String[]{'employeeCode','lastName','firstName','middleName','designation','title','ssn','dept','location','supervisor','startDate','endDate','lunch','lunchHours','payRate0','payRate1','payRate2','payRate3','cardnum1','cardNum2','cardNum3','password','options','home1','home2','home3','schedule','exportBlock'};
    }
    public class EmployeeWebInterfaceSoap {
        //public String endpoint_x = 'http://www.payrollservers.us:8002/scci/xml/EmployeeWebInterface.asmx';
        public String endpoint_x = 'http://www.payrollservers.us/scci/xml/EmployeeWebInterface.asmx';
        
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        public mc2csComScci.AuthHeader AuthHeader;
        private String AuthHeader_hns = 'AuthHeader=https://mc2cs.com/scci';
        private String[] ns_map_type_info = new String[]{'https://mc2cs.com/scci', 'mc2csComScci'};
        public String AddEmployee(String employeeCode,String lastName,String firstName,String middleName,String designation,String title,String ssn,String dept,String location,String supervisor,String startDate,String endDate,Integer lunch,Double lunchHours,Decimal payRate0,Decimal payRate1,Decimal payRate2,Decimal payRate3,String cardnum1,String cardNum2,String cardNum3,String password,String options,String home1,String home2,String home3,String schedule,Integer exportBlock) {
            mc2csComScci.AddEmployee_element request_x = new mc2csComScci.AddEmployee_element();
            mc2csComScci.AddEmployeeResponse_element response_x;
            request_x.employeeCode = employeeCode;
            request_x.lastName = lastName;
            request_x.firstName = firstName;
            request_x.middleName = middleName;
            request_x.designation = designation;
            request_x.title = title;
            request_x.ssn = ssn;
            request_x.dept = dept;
            request_x.location = location;
            request_x.supervisor = supervisor;
            request_x.startDate = startDate;
            request_x.endDate = endDate;
            request_x.lunch = lunch;
            request_x.lunchHours = lunchHours;
            request_x.payRate0 = payRate0;
            request_x.payRate1 = payRate1;
            request_x.payRate2 = payRate2;
            request_x.payRate3 = payRate3;
            request_x.cardnum1 = cardnum1;
            request_x.cardNum2 = cardNum2;
            request_x.cardNum3 = cardNum3;
            request_x.password = password;
            request_x.options = options;
            request_x.home1 = home1;
            request_x.home2 = home2;
            request_x.home3 = home3;
            request_x.schedule = schedule;
            request_x.exportBlock = exportBlock;
            Map<String, mc2csComScci.AddEmployeeResponse_element> response_map_x = new Map<String, mc2csComScci.AddEmployeeResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'https://mc2cs.com/scci/AddEmployee',
              'https://mc2cs.com/scci',
              'AddEmployee',
              'https://mc2cs.com/scci',
              'AddEmployeeResponse',
              'mc2csComScci.AddEmployeeResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.AddEmployeeResult;
        }
    }
    public class AuthHeader {
        public String userName;
        public String password;
        public String site;
        private String[] userName_type_info = new String[]{'userName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] password_type_info = new String[]{'password','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] site_type_info = new String[]{'site','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'https://mc2cs.com/scci','true','false'};
        private String[] field_order_type_info = new String[]{'userName','password','site'};
    }
    public class AddEmployeeResponse_element {
        public String AddEmployeeResult;
        private String[] AddEmployeeResult_type_info = new String[]{'AddEmployeeResult','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'https://mc2cs.com/scci','true','false'};
        private String[] field_order_type_info = new String[]{'AddEmployeeResult'};
    }
}

 

Code snippet through which I am invoking the server is:

mc2csComScci m = new mc2csComScci();
mc2csComScci.AuthHeader a = new mc2csComScci.AuthHeader();
a.userName = 'testaccount';
a.password = 'password';
a.site = '1';

mc2csComScci.EmployeeWebInterfaceSoap e = new mc2csComScci.EmployeeWebInterfaceSoap();

String result = e.AddEmployee('12344','mathurtest','ptest','test','test','test','313065406','test','test','test','','',1,12,2,2,2,2,'324545','','','','','','','','',1);

system.debug('result is '+result);

 

Error received is:

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: System.Web.Services.Protocols.SoapException: Server was unable to process request. 

 

But I tried the same wsdl file with SOAP UI , it ran successfully providing desired output.

 

My instincts are that I am not setting the auth header parameters properly. But dont know for sure. If  anybody has any ideas, please help.

 

Thanks,

Pragati

 

Hi,

 

I am working on salesforce integration with SwipeClock Online Server. I am trying to call a method of SwipeClock API but receiving following error:

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found

 

I have white listed the following IPs in Salesforce under Setup-> Security Controls -> Network Access :

204.14.232.0/23 East Coast Data Center (set one)
204.14.237.0/24 East Coast Data Center (set two)
96.43.144.0/22  MidWest Data Centers
96.43.148.0/22  MidWest Data Centers
204.14.234.0/23 West Coast Data Center (set one)
204.14.238.0/23 West Coast Data Center (set two)
182.50.76.0/22  Japan Data Center

 

But still facing the error.

 

Pls help me. I need to resolve this issue as a high priority item.

 

Thanks,

Pragati

Hi,

 

I am going to launch an app exchange app but in my code i am using <apex: outputText escape="False"> and this line giving XSS attack issue.  So how to resolve this issue?

 

its Urgent.

 

Thanks,

Soni

Hi all,

 

I have a custom formula field in the Opportunity object, which takes value from a field in the Account objet. This value is then checked in a validation rule.

 

But in my unit test, this validation rule always replies FALSE because the formula field value is "null"…

 

How can I update this formula field within my test class so that the trigger I'm trying to test actually runs ?

 

See here for the complete version of my question (watch out, it's very long, and you're most likely to be scared away! ,-)

Hi,

 

 

Here i got where im trying to update multiple records.But its showing me error like System.List Exception: Duplicate id in list: a07Q0000006oUdqIAE. How to avoid this.


rigger AutoSetoff on Receipt__c (after update,after insert) {

   List<Id> oid=new List<Id>();
   List<Id> rid=new List<Id>();
   List<Receipt__c> rec= new List<Receipt__c>();
  For (Receipt__c R: trigger.new)
    {
       rid.add(R.id);
       system.debug('Add receipt id'+rid);
       
       oid.add(R.Opportunity__c);
       system.debug('Add opp id'+oid);
       }
       rec=[select id,Opportunity__c,Realization_Status__c from Receipt__c where id=:rid];
       system.debug('Receipt'+rec);
       List<Opportunity> O = [Select Name,TotalReceipt_Realized__c,Total_Payment_Received__c from Opportunity
                         Where id =: oid];
       system.debug('OPP'+ O);                  
                         
       List<AggregateResult> groupedResults = [SELECT Sum(Amount__c)aver FROM Receipt__c
                                                Where Opportunity__c =: oid
                                               ];
       system.debug('Groupedresults query'+groupedResults );
       Double TotalReceipt = 0.0 ;
       for(Receipt__c rct:rec)
       {
       if(rct.Realization_Status__c =='Realized')
       {
        if(groupedResults.size() > 0)
        {
            system.debug('Size of grouped results'+groupedResults.size());
            String str = '' + groupedResults[0].get('aver') ;
            system.debug('Checking groupedResults'+str); 
            TotalReceipt = Double.ValueOf(str) ;
            System.debug('TotalReceipt ::::: ' + TotalReceipt) ;
        }
          for(Opportunity Op:O)
          {
            Double dif = TotalReceipt - Op.Total_Payment_Received__c;
            system.debug('Difference'+dif);
            List <Payment_Schedule__c> SList = new list <Payment_Schedule__c>([Select Name,TotalInstallment_Amount__c,Display_Order__c,  Amount_Due__c, Payment_Received__c from Payment_Schedule__c 
                 where Opportunity__c =: Op.id AND Payment_Schedule__c.Amount_Due__c > 0
                 Order By Display_Order__c]);
       
       
             For (Payment_Schedule__c S: SList)
               {
                system.debug('###Inside For');
                 
                 If (S.Amount_Due__c > dif)
                   {
                        system.debug('###Inside If 1'+ S.Payment_Received__c);
                  
                        S.Payment_Received__c = S.Payment_Received__c + dif;
                        system.debug('PaymentReceived'+S.Payment_Received__c );
                        dif = 0;
                    }
            If (S.Amount_Due__c < dif)
            {
             
                S.Payment_Received__c = S.Payment_Received__c + S.Amount_Due__c;
                system.debug('PaymentReceived ########'+S.Payment_Received__c );
                dif = dif - S.Amount_Due__c;
                   system.debug('Differenceone'+dif);
            }
        }
        Update SList;
    
}
}
}
      

 }

 

 
public void m1(){
String fContent =fbody.toString();
        List<String> Rows = fContent.split('\n');
        DataLoad__c obj;
        List<DataLoad__c> lstD = new List<DataLoad__c>();
        for(Integer i=0;i<Rows.size();i++){
            List<String> ColsData = Rows[i].split(',');
            obj = new DataLoad__c(name=ColsData[0],city__c = ColsData[1],Country__c = ColsData[2]);
            lstD.add(obj);
        }
        system.debug('----> lstD'+lstD);
        insert lstD; 
}

  Can you please paste the test class for the above code

Hi,

 

http://na7.salesforce.com/mobileclient/api/mobileforce.js

With the help of the above javascript library, I was getting the latitudes and longitides of the mobile device (iPhone). However, the values of lat/lon which the app is pulling is something like this:

 

14.94669000000000, -88.239319000000000.

 

I need to get better accuracy into the red zeros. Is it possible to capture more than 6 decimal points ?

 

Thanks,

Pragati


 

 

I am fetching attachment object from java. So, I am getting the Attachement Body in base64 type. 

How can I get complete body of attachment in Java. 

 

Please suggest.

You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 

 <apex:pageBlock title="Customer Stage" mode="inlineEdit">
<apex:pageBlockTable value="{!CustomerSatgeList}" var="customerSatge">									
	     <apex:column >
		<apex:facet name="header">Color1</apex:facet>
			<apex:detail subject="{!customerSatge.Name}" relatedList="false" inlineEdit="true"/>
		</apex:column>	
	</apex:pageBlockTable>
 </apex:pageBlock>

 

I need the security token of Sandbox and Production. But there is no option under setup configuration for regenerating it. 

My profile is System Admin but still I am facing this problem.

 

I also tried to regenerate the token by changing the password. But no mail is sent to the id associated with the user accessing the sandbox.

 

Please help.

 

Thanks

Hi,

 

  I want to create a restful web service in salesforce. Is it possible because i have check the options in setup(Trigger class), but not see any option for restful service.

 

Thanx

Hi,

 

I tried googling around, but I couldn't really find what I am looking for. What are currently the options of changing the behaviour and content of standard (new/edit) pages? See below for the scenario I would like to create.

 

I would like to create address lookup based on postcode details. For this I would like to modify existing pages for accounts.So I created a sidebar component and added some javasript to modify the components. Unfortunately, when deploying to sandbox I found out that it will not work, because different server addresses for the visual force servers

 

[code]

window.parent.document.getElementById('acc17country')

[/code]

 

Since the account has a lot of fields I don't really like to go into the way of full recreate the new/edit pages with a new visual force page.

 

So I am looking for ways to modify the content, I know there are some things possible like adding a (floatable) picklist for the countries in this app CountryCompleteFree. But I cannot really understand how they are doing this. Any help will be appreciated.

 

Has anyone managed to deploy a custom javascript button using ANT.

After looking around a bit I can't find any help on this.


An example with package.xml, and the object xml would be much appreciated, as would any pointers on where to look to figure this out.

 

For example, in package.xml, what name do we use in Package/types/name markup. CustomObject?

If CustomObject is correct, what markup should be in the customobject.object file in the objects directory?

 

Thanks

We have a webservice that sometimes gets inundated with requests from an APEX trigger we have.  So, we wrote a .NET batch program to do the requests via API through SFDC with a 45 second delay between requests.  We'd like to make that a Batch APEX, however, I can't find any way to make the APEX code pause between submittals.  I tried a loop checking on the time, but that causes 200K worth of script statements which exceeds governor limits too.

 

Does anyone have any ideas?

 

Thanx!

Hi All,

 

I have some custom setting of type List set up in my development org. I get the values of custom setting in the developement org and my business logic execute properly.

However I am not getting same custom settings values in managed Package .

 

Any pointer please ?

 

Thanks.