• APN09217013342392059
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 11
    Replies
if a certified managed package initiates batch apex, does it come under governer limits of native org for batch apex?

e.g. per documentation,
The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period
= 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater

Does this include batch apex initiated by managed package ? or does managed package gets a separate limit for batch apex?

I know from the documentation that managed package has separate number of DML and SOQL execution limit
per transaction.

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm#certified_pkg_limits_section

I was wondering what the behavior is for batch apex.
I am trying out few lightening stuff and as a part of that I added namespace to my Developer edition. After doing this I realized that all my preexisting custom object's API name is now prefixed with the namespace. e.g. object name before adding namespae - MyCustomObject__c object name after adding namespace - MyNamespace__MyCustomObject__c

My existing Apex code which is using MyCustomObject__c is working fine. But any new query that I am firing from dev console requires me to add namespace prefix.

my questions is -

what is the impact of adding namespace ? 1. Do we need to revisit all apex code/soql query ? 2. Do we need to recreate enterprise WSDL and correct SOAP API calls ?

Any insight on this would be very helpful.
Below is my page code,

<apex:page controller="SampleLocation">

<head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0 }
      #map-canvas { height: 100% }
    </style>
    <script type="text/javascript"
      src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY">
    </script>
    <script type="text/javascript">
      function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(-34.397, 150.644),
          zoom: 8
        };
        var map = new google.maps.Map(document.getElementById("map-canvas"),
            mapOptions);
      }
      google.maps.event.addDomListener(window, 'load', initialize);
    </script>
  </head>
  <body>
    <div id="map-canvas"/>
  </body>



</apex:page>

when I preview the page, nothing is shown.

when I save the exact same code in separate html file ( after removing apex:page tag) the code works just fine. I am sure that there is no issue with the API key.

any idea what is going wrong here ?
We currently make SOAP API calls from C# using enterprise WSDL.

Is it possible to make SOAP API calls using recently released Salesforce tookkit for .NET ?
or is the tookit used only for REST API calls ?


Look forward to an answer
I have a custom object and I have overridden "New" button for this object.
 On click of "New" I am showing a visualforce page with standard controller and extension.

There is a "Submit" button on this VF page and on cliclk of this button, Visualforce page calls a action method in the controller extension, which inserts a new record. After inserting this record I want to redirect use to the detail page of this record.

I am returning PageReference from my action method. But I see that redirect never happens and UI shows blank.

below the code snippet of my action method

public PageReference ValidateAndSave()
{
    
      insert refundGroup; //insert the record here

      system.debug('refund group id - ' + refundGroup.Id);
      //redirect to the newly created RefundGroup record
      PageReference pageRef = new PageReference('/' + refundGroup.Id + '?nooverride=1');
      pageRef.setRedirect(true);
      return pageRef;                   
 }


Please note the use of nooverride=1 in the URL.
this successfully inserts a record but never redirects to the detail page of the inserted record.

Any idea what is going on here and why redirect is not working ?
I have a VF page which is marked for mobile devices and has,  docType="html-5.0" standardStylesheets="false" showHeader="false" sidebar="false"
I want to show chatter feed on this page.
When I use <chatter:feed /> on the page it doesn't render correctly which I believe because starndarStyleSheets is set to false.
I want to keep it as false as I am using Mobile design templates.

Any idea whats is the quickest way to show a chatter feed with correct styling ?
I have a publisher action of type "custom visualforce".

I am using Sfdc.canvas.publisher.subscribe method to know when the "submit" button on publisher is clicked.
I also want to know when the "cancel" button on the publisher is clicked.

I have below script in my VF page,

<script type='text/javascript'>
            Sfdc.canvas.publisher.subscribe({name: "publisher.post", onData:function(e) {
              
                console.log("Submit clicked");
             }});

            Sfdc.canvas.publisher.subscribe({name: "publisher.close", onData:function(e) {
             
                console.log("Cancel clicked");
             }});                                         
     </script>

When I click the submit button, I see successful log - "Submit Clicked"
But when I click the Cancel button nothing is logged.

Any idea how can I do this ?
There doesn't seem to be any documentation on different events that you can subscribe to.

I have a extension controller for my Visualforce Page.
It has 2 Action methods, method1() and method2().
Each method executes DML statements.

if there is failure in method2(), I need to rollback the DMLs made by method1 ( as well as method2).

I am trying to use SavePoint as a class member because savepoint will be set in method1 and will be accessed in method2 for rollback.

creating a savepoint as class member requires it to be declared as "transient".
If it is transient, the class level savepoint varialble is null, so the Database.rollback(sp) fails.

So does it mean it is not possible to have a savepoint as class member in extension controller ?
I am trying out few lightening stuff and as a part of that I added namespace to my Developer edition. After doing this I realized that all my preexisting custom object's API name is now prefixed with the namespace. e.g. object name before adding namespae - MyCustomObject__c object name after adding namespace - MyNamespace__MyCustomObject__c

My existing Apex code which is using MyCustomObject__c is working fine. But any new query that I am firing from dev console requires me to add namespace prefix.

my questions is -

what is the impact of adding namespace ? 1. Do we need to revisit all apex code/soql query ? 2. Do we need to recreate enterprise WSDL and correct SOAP API calls ?

Any insight on this would be very helpful.
I am trying to call a public facing webservice. I am able to call this webservice using SoapUI and it returns me the output I seek.
I downloaded the wsdl and generated a wsdl class. After generating the wsdl class, I tried to invoke this in an Execute Anonymous block of code.
The webservice is hosted at: http://peopleask.ooz.ie/soap
The block of code I used to call the service is:

peopleaskOozIeSoap.PeopleAskServiceSoap mypass = new peopleaskOozIeSoap.PeopleAskServiceSoap();
peopleaskOozIeSoap.ArrayOfstring hoos = new peopleaskOozIeSoap.ArrayOfstring();
hoos =  mypass.GetQuestionsAbout('lauren bacall');

The error I am facing is:
FATAL_ERROR|System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://peopleask.ooz.ie/soap:GetQuestionsAboutResponse' but found ':Questions'


What am I doing wrong? How can I call this webservice? 
Case Description: Frequent Salesforce API login issues in production and sandbox environments.

Inner Exception: SERVER_UNAVAILABLE: server temporarily unavailable

The wsdl is SFDC_Enterprise.wsdl

This has been reported twice via 2 another cases. Case 10239485 (This case was not roted to the appropriate party as I think the person helping on this case did not understand the real issue). Case 10291756 (This case ended up being not at all helpful. The person never responded.).

I need this case escalated to a high priority as this is happening intermittently in our production box.
I have a custom object and I have overridden "New" button for this object.
 On click of "New" I am showing a visualforce page with standard controller and extension.

There is a "Submit" button on this VF page and on cliclk of this button, Visualforce page calls a action method in the controller extension, which inserts a new record. After inserting this record I want to redirect use to the detail page of this record.

I am returning PageReference from my action method. But I see that redirect never happens and UI shows blank.

below the code snippet of my action method

public PageReference ValidateAndSave()
{
    
      insert refundGroup; //insert the record here

      system.debug('refund group id - ' + refundGroup.Id);
      //redirect to the newly created RefundGroup record
      PageReference pageRef = new PageReference('/' + refundGroup.Id + '?nooverride=1');
      pageRef.setRedirect(true);
      return pageRef;                   
 }


Please note the use of nooverride=1 in the URL.
this successfully inserts a record but never redirects to the detail page of the inserted record.

Any idea what is going on here and why redirect is not working ?
Hi Support,
Some times we are getting the following exceptions when insert/update leads in salesforce. But not every time. We are using valid credentials and security tokens.
Error:

1. INVALID_LOGIN: Invalid username, password, security token; or user locked out.
2. SERVER_UNAVAILABLE: Too many requests waiting for connections to Standard_Data_Source_1(DataSourceDetailsTemplateConfig)1, Num waiting=36, Thread=/services/Soap%2Fc%2F20.0%2F0DFA0000000GzCP, Current url=/services/Soap%2Fc%2F20.0%2F0DFA0000000GzCP
3. The remote name could not be resolved: 'na10.salesforce.com'
4.Character reference "" is an invalid XML character.

We have created a case regarding this. 
We got response like "I have escalated your case to our Developer team for processing." . But we are not get any response yet. Can you please let me know the root cause for the issue and how to fix the issue?
here i want to fetch the case object for corresponding all attachments
using casenumber

public void getFilesfromSalesforce(string strCaseno)
{
        try
        {
            binding = new SforceService();
            lr = binding.login(strUserName, strpassword);
            loginResult = lr;
            //SforceService salesforce = new SforceService();
            binding.SessionHeaderValue = new SessionHeader();
            binding.SessionHeaderValue.sessionId = loginResult.sessionId;
            binding.Url = loginResult.serverUrl;
           
            QueryResult qResult = null;
            //Enterprise.Attachment at = new Enterprise.Attachment();
            //at.
         
         String soqlquery2 = "SELECT Id, CaseNumber,Status FROM Case  where CaseNumber =:"+ strCaseno;
         String soqlQuery = "Select Id, ParentId From Attachment where ParentId = " + soqlquery2.CaseNumber; here i am getting an error malformed query

            qResult = binding.query(soqlQuery);

           
        }
        catch (Exception ex)
        {

          
        }
I have a validation where I am comparing a rollup summary field ( sum of currency type field) with 0.00 but I am getting following error while evaluating validation rule on inserting record.
Hi frnds,
Need some help for me 
to write a test class for the below class 

public class EF_GetUserDetailFormOkta_Search_AC
{

       //public String apiEndpoint = OKTA_EndPoint__c.getValues('OKTA').Site_URL__c;
       //public String result      = '[]';
       //public String authToken   = OKTA_EndPoint__c.getValues('OKTA').Auth_token__c;
     
        public string apiEndpoint   = 'http://ec2-user@ec2-54-219-23-118.us-west-1.compute.amazonaws.com:8090/allergan.oktapreview.com/api/v1/';
        public string authToken     = 'SSWS 006BBGUE4NNIpFNpdqUm8EWLELIQuQu-SoasGMeWnV';
        public Integer timeoutOKTA      = 60000; 


   
   
    public string strSearchData {get; set;}
    public List<string> lstData {get; set;}
    public List<WrapUserDetail> lstWrapAllData {get; set;}
   
    public boolean isUserNameSelected{get; set;}
    public boolean isFirstNameSelected{get; set;}
    public boolean isLastNameSelected{get; set;}
    public boolean isEmailSelected{get; set;}
    public boolean isEmployeeIDSelected{get; set;}
    public boolean isCPIDSelected{get; set;}
    public boolean isManagerIDSelected{get; set;}
   
    public class WrapUserDetail
    {
        public string strUserName {get; set;}
        public string strFirstName {get; set;}
        public string strLastName {get; set;}
        public string strTitle {get; set;}
        public string strEmail {get; set;}
        public string strEmployeeID {get; set;}
        public string strCPID {get; set;}
        public string strManager {get; set;}
        public string strLocation {get; set;}
        public string strUserOktaID {get; set;}
       
       
        public WrapUserDetail(string UserOktaID,string UserName, string FirstName, string LastName, string Title, string Email, string EmployeeID, string CPID, string Manager, string Location)
        {
            strUserOktaID = UserOktaID;
            strUserName = UserName;
            strFirstName = FirstName;
            strLastName = LastName;
            strTitle = Title;
            strEmail = Email;
            strEmployeeID = EmployeeID;
            strCPID = CPID;
            strManager = Manager;
            strLocation = Location;
        }
    }
   
    public EF_GetUserDetailFormOkta_Search_AC()
    {
        lstData = new List<string>();
        strSearchData = '';
    }
    public void SearchData()
    {
        lstWrapAllData = new List<WrapUserDetail>();
        string QueryFilter  = CreateSearchString();
        string result = getUserList(QueryFilter);
        List<object> lstAllData = (List<object>)JSON.deserializeUntyped(result);
        system.debug('lstAllDatalstAllDatalstAllData:: ' + lstAllData);
        for(object obj : lstAllData)
        {
           
            Map<string, Object> mapData = (Map<string, Object>)obj;
           
            Map<string, Object> mapProfile = (Map<string, Object>)mapData.get('profile');
            //strUserOktaID
            WrapUserDetail objWrapUserDetail = new WrapUserDetail((string)mapProfile.get('id'),(string)mapProfile.get('AGNLoginID'), (string)mapProfile.get('firstName'), (string)mapProfile.get('lastName'),
                                                                    (string)mapProfile.get('title'), (string)mapProfile.get('email'), (string)mapProfile.get('employeeID'),
                                                                    (string)mapProfile.get('IDMCPID'), (string)mapProfile.get('manager'), (string)mapProfile.get('IDMCORALLocation'));
           
            lstWrapAllData.add(objWrapUserDetail);
        }
    }
   
    /**
     * @author         Krzysztof Wasniowski <k.wasniowski@polsource.com>
     * @version        1.0
     * @date           12/1/2013
     * @description    Returns list of users maching given filter defintion from OCTA API
     * @param          string filterDefinition Filter definition, f.ex: (userName pr or name.givenName eq Edward)
     * @return         string API response (json string)
     * @throws         EF_OKTA_APIException throws an exception is response is not 200 or filter definition is empty
     */
    public String getUserList(string filterDefinition)
    {
        String result       = '[]';
       
        Http h              = new Http();
        HttpRequest req     = new HttpRequest();
        String queryParams  = '?filter=' + EncodingUtil.urlEncode(filterDefinition.trim(), 'UTF-8');
       
        system.debug('queryParamsqueryParamsqueryParams::::New ' + queryParams);
       
        req.setMethod('GET');
        req.setHeader('Accept', 'application/json');
        //req.setTimeout(timeoutOKTA);
        req.setEndpoint(apiEndpoint + '/users' + queryParams);
        req.setHeader('Authorization', authToken);
       
        system.debug('reqreqreqreq:::New ' + req);
       
        HttpResponse res = h.send(req);
        system.debug('resresresres:::New ' + res);
       
        if (200 == res.getStatusCode()) {
            result = res.getBody();
        }
       
        return result;
    }
   
    public string CreateSearchString()
    {
        string strQueryStringToReturn = '';
       
        if(isUserNameSelected)
        {
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.AGNLoginID co ' + '\'' + strSearchData + '\'';
        }
        if(isFirstNameSelected)
        {   
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.firstName co ' + '\'' + strSearchData + '\'';
        }
        if(isLastNameSelected)
        {   
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.lastName co ' + '\'' + strSearchData + '\'';
        }
        if(isEmailSelected)
        {   
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.email co ' + '\'' + strSearchData + '\'';
        }
        if(isEmployeeIDSelected)
        {   
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.employeeID co ' + '\'' + strSearchData + '\'';
        }
        if(isCPIDSelected)
        {   
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.IDMCPID co ' + '\'' + strSearchData + '\'';
        }
        if(isManagerIDSelected)
        {   
            if(strQueryStringToReturn != '')
                strQueryStringToReturn += ' or ';
           
            strQueryStringToReturn += 'profile.managerID co ' + '\'' + strSearchData + '\'';
        }
       
        system.debug('strQueryStringToReturn:::: ' + strQueryStringToReturn);
        return strQueryStringToReturn;
    }
}


Thanks in Advance 
Hello Everyone,

I am new to salesforce1 and having problem while working with VF pages. I have a VF page that saves some records. When i edit any record and updates the value, the value is changed in the database but doesn't reflect on the standard detail page but when i refresh my page then the updated value appeared. I think old value is displaying from the cookies. I am using salesforce1 mobile browser app. Can anyone tell me how can i get the refreshed value?

Thanks in advanced

Hello,

 

I imported an HTML template into SalesForce that included various linked CSS files.  I am wanting to embed a chatter feed into the page but whenever I add the component it completely changes the styling of my page.  I assume this is because standard SalesForce style sheets are enabled once a standard component is added.

 

Is there anyway I could add the chatter feed without enabling the Salesforce style sheets?  How do other people mix standard VisualForce components with their VisualForce site's CSS?

  • November 13, 2013
  • Like
  • 0

I've gotten maybe 10 of these from an integration we have that simply pulls Contract records from production.  Iv'e had these one and off (maybe like 1 every 10 days) for a couple months, but this morning I've gotten just a landslide.    Using reflector, the endpoint I'm pointing to currently (in the app config) is: "https://www.salesforce.com/services/Soap/u/16.0".  

 

Is there something change that I missed or something like that with Salesforce connectivity?  Thanks. 

 

Machine: CSMSIIS1

Date: 2/19/2010 8:12:40 AM

Type: System.Net.WebException

Assembly: CSG.MSI.Contracts.SFDCWrapper, CSG.MSI.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Codebase: file:///C:/Program Files/Metastorm BPM/Engine/dotnetbin/CSG.MSI.Contracts.DLL

Message: The underlying connection was closed: An unexpected error occurred on a receive.

Source: CSG.MSI.Contracts

Stacktrace:    at CSG.MSI.Contracts.SFDCWrapper.ExecuteSOQL(String soql) in C:\Documents and Settings\bryang\Desktop\CSG.MSI.Contracts\CSG.MSI.Contracts\DAL\Util\SFDCWrapper.vb:line 127

   at CSG.MSI.Contracts.SFDCContractMapper.SelectMultipleInternal(String SOQL) in C:\Documents and Settings\bryang\Desktop\CSG.MSI.Contracts\CSG.MSI.Contracts\DAL\Data\Mappers\SFDCContractMapper.vb:line 77

   at CSG.MSI.Contracts.SFDCContractMapper.Select(String id) in C:\Documents and Settings\bryang\Desktop\CSG.MSI.Contracts\CSG.MSI.Contracts\DAL\Data\Mappers\SFDCContractMapper.vb:line 25

   at CSG.MSI.Contracts.ContractStatus.GetContractStatus(String contractid) in C:\Documents and Settings\bryang\Desktop\CSG.MSI.Contracts\CSG.MSI.Contracts\BLL\ContractStatus.vb:line 6

   at CSG.MSI.Contracts.Contract.GetContractStatus(String contractId) in C:\Documents and Settings\bryang\Desktop\CSG.MSI.Contracts\CSG.MSI.Contracts\Contracts.vb:line 6

Exception Custom Data: 

SOQL Statement = SELECT Id, AccountId, OwnerId, Status, Opportunity__c, Contract_Status__c, Contract_Begin_Date__c, Contract_Type__c  FROM Contract  WHERE Id = 'XXXXXXX'  

 

Any ideas would be most welcome.  Thanks.