• JBabu
  • NEWBIE
  • 425 Points
  • Member since 2012

  • Chatter
    Feed
  • 17
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 150
    Questions
  • 243
    Replies

what  is transient keyword ....how to use in transient key word in salesforce

 

Dear All, The requirement is to auto populate the Fields like firstname, lastname, city, etc (Fields of Standard object 'Lead'); based in the selection on the self Lookup ('Lead') Basically trying to auto populate various (standard) Fields based the Selection of the existing Lead using Lookup (Lead) The 'SearchLead' is a custom field with Lookup (Lead) and all the other fields are standard Lead Fields Requirement is to auto populate the Standard Field based on the selection of existing Lead using the 'SearchLead' Please Help Warm Regards,

Hi All,

 

I am unable to insert qoute into account & oppportuntiy. Can you please help me out.....

 

Error Message: System.QueryException: List has no rows for assignment to SObject 
Class.QuickqouteUI.InsertQuoteToAccount: line 28, column 1
Class.QuickqouteUI.<init>: line 12, column 1

 

VF Page & Controller:

<apex:page controller="QuickqouteUI" action="{!InsertQuoteToAccount}" showHeader="false">
 <apex:sectionHeader title="Quote Details"/>
  <apex:form >
<style>
     .labelCol
     {
         font-family:"Times New Roman"
         color:black font;
     }
 </style>
  <style>
  .inactiveTab {
        background-color: ????;
        font-family:"Times New Roman"
        font-weight:bold;
        color:black;
        background-image:none
      }
</style>
      <apex:pageBlock >
          <apex:pageBlockSection columns="1"  >
              <apex:inputField value="{!objRoofDetails.Quote_description__c}" />
               <apex:inputField value="{!objRoofDetails.City_State__c}" />
               <apex:inputField value="{!objRoofDetails.Install_Date__c}" />
          </apex:pageBlockSection>
          <apex:pageBlockSection columns="1" Title="Solar System">
              <apex:pageBlockSectionItem >
                  <apex:outputLabel value="Description"></apex:outputLabel>
                  <apex:inputText />
              </apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem >
                  <apex:outputLabel value="System price"></apex:outputLabel>
                  <apex:inputText />
              </apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem >
                  <apex:outputLabel value="Description"></apex:outputLabel>
                  <apex:tabPanel id="tabpanel" immediate="true" reRender="tabpanel">
                  <apex:tab label="Roof 1">
                      <table>
                          <tr>
                              <td align="right"><apex:outputLabel value="Description" styleClass="labelCol" ></apex:outputLabel></td>
                              <td><apex:inputText /></td>
                              <td></td>
                          </tr>                          
                          <tr>
                              <td align="right"><apex:outputLabel value="Modules per strings" styleClass="labelCol" ></apex:outputLabel></td>
                              <td><apex:inputText /></td>
                              <td><a href="http:google.com">Design Tools</a></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel value="Total parallel strings" styleClass="labelCol" ></apex:outputLabel></td>
                              <td><apex:inputText /></td>
                              <td></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel value="Inverter Manufaturer" styleClass="labelCol" ></apex:outputLabel></td>
                              <td>
                                  <apex:selectList id="Inventers" size="1" label="Direction">
                                             <apex:selectOptions value="{!Inventers}" ></apex:selectOptions>
                                   </apex:selectList>
                              </td>
                              <td></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel value="Inventer Model" styleClass="labelCol" ></apex:outputLabel></td>
                              <td>
                                  <apex:selectList id="Model" size="1" label="Direction">
                                             <apex:selectOptions value="{!Inventers1}"></apex:selectOptions>
                                   </apex:selectList>
                              </td>
                              <td></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel value="Inverter Count" styleClass="labelCol" ></apex:outputLabel>
                              </td>
                              <td><apex:inputText /></td>
                              <td></td>
                          </tr>
                      </table>                      
                     
                  </apex:tab>
                  <apex:tab label="Roof 2">
                   <table>
                          <tr>
                              <td align="right"><apex:outputLabel styleClass="labelCol" value="Description"></apex:outputLabel></td>
                              <td><apex:inputText /></td>
                              <td></td>
                          </tr>                          
                          <tr>
                              <td align="right"><apex:outputLabel styleClass="labelCol" value="Modules per strings"></apex:outputLabel></td>
                              <td><apex:inputText /></td>
                              <td><a href="http:google.com">Design Tools</a></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel styleClass="labelCol" value="Total parallel strings"></apex:outputLabel></td>
                              <td><apex:inputText /></td>
                              <td></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel styleClass="labelCol" value="Inverter Manufaturer"></apex:outputLabel></td>
                              <td>
                                  <apex:selectList id="Inventers1" size="1" label="Direction">
                                             <apex:selectOptions value="{!Inventers}"></apex:selectOptions>
                                   </apex:selectList>
                              </td>
                              <td></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel styleClass="labelCol" value="Inventer Model"></apex:outputLabel></td>
                              <td>
                                  <apex:selectList id="Model1" size="1" label="Direction">
                                             <apex:selectOptions value="{!Inventers}"></apex:selectOptions>
                                   </apex:selectList>
                              </td>
                              <td></td>
                          </tr>
                          <tr>
                              <td align="right"><apex:outputLabel value="Inverter Count" styleClass="labelCol" ></apex:outputLabel>
                              </td>
                              <td><apex:inputText /></td>
                              <td></td>
                          </tr>
                      </table>           
                  </apex:tab>
                  <apex:tab label="Roof 3"></apex:tab>
                   <apex:tab label="Roof 4"></apex:tab>
                   </apex:tabPanel>
              </apex:pageBlockSectionItem>
           </apex:pageBlockSection>
      </apex:pageBlock>
  </apex:form>
</apex:page>

 

Apex Controller:

public with sharing class QuickqouteUI {
    
    public Roof_Details__c objRoofDetails{get;set;}
    public Quote objquote{get;set;}
    private String accID{get;set;}
    public QuickqouteUI()
    {
        
    objRoofDetails = new Roof_Details__c();
    objquote = new Quote();
    accID = '0038000000h4oyM';
InsertQuoteToAccount();
    }
public List<SelectOption> getInventers() {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('SunPower','SunPower'));
        options.add(new SelectOption('SunPower','NonSunPower'));
        return options;
    }
public List<SelectOption> getInventers1() {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('6.0kW (Model PVI-6000-OUTD)', '7.0kW (Model PVI-6000-OUTD)'));
        options.add(new SelectOption('8.0kW (Model PVI-6000-OUTD)', '8.0kW (Model PVI-6000-OUTD)'));
        return options;
    }
public void InsertQuoteToAccount(){
       
        opportunity objopp = [select account.name from opportunity where AccountId=: accID];
        objquote.name ='testi';
        objquote.opportunityid = objopp.id;
        insert objquote;
    }
}

I would like to make a trigger for after an opportunity is created.  I want it so that when an opportunity is created the trigger checks if the opportunity owner's role is either 'success' or 'sales'.  If the owner's role is sales the trigger will then update the opportunity type to 'initial sale' or if the owner's role is success the the type will be 'add/subtract'.  Below is my code, even though I know it is completely wrong I thought I'd share.

 

trigger myOpptType on Opportunity (after insert)
{
{
Opportunity myOpptType = trigger.new[0];
if (myOpptType.Owner = Matthew Wolach)
{
myOpptType.Type = 'Add/Subtract';
update myOpptType;
}
}
}

 

thanks for the help!

  • October 10, 2012
  • Like
  • 0



share price value is changing every one hour in share market......im updating that value in my account stock history object......

for example ibm company has 130(morning 9am)

                                                         120(morning 10am)

                                                         125(morning 11 am).......like that

  i need  first price(open price) in my visual force page how i can get it?

  • September 18, 2012
  • Like
  • 0

I am new to Apex and am having an issue moving a trigger I created in Sandbox through a Change Set to production.  The trigger I created is working great but when I try the Change Set it does not validate because it says I need to test the trigger.  I was reading about Apex Test Methods but am a little confused as to how to I execute the test.  Any help on next steps would be greatly appreciated!  The trigger I need to test is:

 

trigger CoverageLetterTask on Claim__c (before update) {
 List<Task> tasks = new List<Task>();
    for(Claim__c claim : Trigger.new){
    if(claim.Task_created__c != null &&
       claim.Task_created__c == false &&
       claim.Approval_Received__c == true &&
       claim.Insured__c != 'Catholic Health East'){


//Do your Task creation
            Task CoverageTask= new Task();
            CoverageTask.ActivityDate = claim.LVL_Received_Date__c + 30;   
            CoverageTask.WhatId = claim.id;
            CoverageTask.OwnerId = claim.Assigned_Examiner2__c;   
            CoverageTask.Priority = 'Normal';   
            CoverageTask.Status = 'Not Started';
            CoverageTask.Subject = claim.Program_ID__c + ' Coverage Letter -- ' + claim.Insured__C + ' -- ' + claim.Claimant_Name__c;   

//Add the Task
tasks.add(CoverageTask);
            
//Update the field on Claim so this isn't done again
            claim.Task_Created__c = true;
        }
    }  
    
    insert tasks;
}

  • August 25, 2012
  • Like
  • 0

Hi All,

 

I would really appreciate it if someone can please help me bulkify the following code:

 

/*Trigger name : InsertOppTeam
*
* Author : Rajat Mahajan
*
* Description : This is to insert Opportunity Team while inserting or updating Opportunitys.
*/

trigger InsertOppTeam on Opportunity (after insert, after update) {

Set<Id> idOpp = new Set<Id>();
Set<Id> OppEndCustomerId = new Set<Id>();
List<OpportunityTeamMember> lstOppTeam = new List<OpportunityTeamMember>();

//Declare Variables to query Account Directory and then the Account Owner from User Object
User userRec = new User();
Account_Info__c accountRec = new Account_Info__c();

System.debug('Testing out Trigger.New Content Debug 1 : ' + Trigger.New);

for(Opportunity newOpp : trigger.new) {
if(newOpp.End_Customer__c != null) {
idOpp.add(newOpp.Id);
OppEndCustomerId.add(newOpp.End_Customer__c);
accountRec = [select id, Account_Manager__c from Account_Info__c where id in:OppEndCustomerId limit 1];
userRec = [select Id from User where isActive = true and name = :accountRec.Account_Manager__c];

OpportunityTeamMember tm = new OpportunityTeamMember();
tm.UserId = userRec.Id;
tm.OpportunityId = newOpp .Id;
insert tm;
}
}

}

 

It would be great if you can help me out please.

 

Regards

Rajat

I have written a simple Opportunity trigger to update a field in Opportunity Line Item records when an Opportunity is moved to certain stages.  I am now trying to write a test class so I can deploy it to my production server.  When I run the test (code is listed below),  I get the error:

 

15:15:27.915 (915680000)|EXCEPTION_THROWN|[17]|System.DmlException: Insert failed. First exception on row 0; first error: STANDARD_PRICE_NOT_DEFINED, No standard price defined for this product: []

 

My test data includes creating test records for Pricebook2, Product2 and PricebookEntry, but none of these objects have a field for the Standard Price and I can't find it in any other object.

 

Does anyone know where the Standard Price is stored?    Below is my test class code - I am just trying to get this simple test to run then I'll be adding more test cases.

 

-----------------------------------------------------------------------

@isTest

private class TestUpdateClosedListPrice {

static testMethod void TestUpdateClosedListPrice() {

Opportunity opp1 = new Opportunity (Name='Opp1',StageName='Stage 0 - Lead Handed Off',CloseDate=Date.today());
insert opp1;

Pricebook2 pbk1 = new Pricebook2 (Name='Test Pricebook Entry 1',Description='Test Pricebook Entry 1');
insert pbk1;

Product2 prd1 = new Product2 (Name='Test Product Entry 1',Description='Test Product Entry 1');
insert prd1;

PricebookEntry pbe1 = new PricebookEntry (Product2ID=prd1.id,Pricebook2ID=pbk1.id,UnitPrice=50);
insert pbe1;

OpportunityLineItem lineItem1 = new OpportunityLineItem (OpportunityID=opp1.id,PriceBookEntryID=pbe1.id,Closed_List_Price__c=0);
insert lineItem1;

Test.startTest();

opp1.StageName='Stage 8 - Shipped';
update opp1;
System.assertNotEquals(0, lineItem1.Closed_List_Price__c);

Test.stopTest();
}
}

 

Hi,

We have built communities in our sandbox.
We have upgraded our sandbox to spring 17 and our community url is broken.

We have customized the community portal with many lightning components and also allowed guest users to login.

Now we are not even able to access the community portal url.

Did any one face the issue? Can you please help us?

Thanks,
Babu.
  • January 11, 2017
  • Like
  • 0
Hi,

I need to invoke the below java script function on the load of VF page in the console

    $(document).ready(function(){
       // Java script function
    });
    
Note: In the console, list view, I click a custom list button and this will pop up the Visualforce page.

In this page the above function is not getting fired automatically.

Thanks,
Babu.
  • June 02, 2015
  • Like
  • 0
Hi,

I need to run report on the email body field?
It is has few merge fields.

Please let me know if we can run reports on this field? How?

Thanks,
Babu.
  • May 19, 2015
  • Like
  • 0
Hi,

I have popped a vf page from a button of on the std case page
I am inserting some values from the pop up vf page to the std case page.

But to see the updated values  in the std case page, I need to manually refresh the case.

Is there any way, can that case page be automatically refreshed when the values are inserted in to case object?

Please let me know.

Thanks,
JBabu.
  • May 15, 2015
  • Like
  • 0
Hi,

We have items picklist field on case object.
My business team wants to control the values of the picklist.

We do not want to give them sys admin profile.
Is there any way they can control the picklist values without giving the sys admin profile?
Is there any other profile which can do this? (or) is there any other option?

Thanks,
JBabu.

 
  • May 15, 2015
  • Like
  • 0
Hi,

Currently my case object has 40 fields for history tracking.
(we have already increased the limit from 20 to 40).

Please let me know whether we can further increase the limit?

Thanks,
JBabu.
  • May 15, 2015
  • Like
  • 0
Hi,

I have popped a vf page from a button of on the std case page (of console layout).
I am inserting some values from the pop up vf page to the std case page.

But to see the updated values  in the cosole case page, I need to manually refresh the console.

Is there any way, can that console page be automatically refreshed when the values are inserted in to case object?

Please let me know.

Thanks,
JBabu.
 
  • May 15, 2015
  • Like
  • 0
Hi,

I want to redirect my VF page to std console case object and pre poulate few case fields.
I was able to redirect it, but I case is not getting displayed in console (it is getting displayed in normal case detail page)
I am loosing console std layout - mainly I need the suggested articles in right side section (it is missing).

Can some one please help me with this?

Here is my VF page:

<apex:page standardController="case" extensions="redirecttoconsoletest" title="{!Case.CaseNumber}" >
<apex:detail subject="{!Case.ID}" relatedlist="true" inlineEdit="true"/>

 <apex:includeScript value="/support/console/28.0/integration.js"/>
   <A HREF="#" onClick="testOpenPrimaryTab();return false">
         Click here to open a new primary tab</A>   
        <script>
            var button;
            function disableButton()
            {
                button.disabled = true;
            }
            
        </script>
        
        <script type="text/javascript">  
        
      function testOpenPrimaryTab() {
            //Open a new primary tab with the salesforce.com home page in it
            sforce.console.openPrimaryTab(null, 'http://www.salesforce.com', false, 
                'salesforce', openSuccess, 'salesforceTab');
        }
        
        var openSuccess = function openSuccess(result) {
            //Report whether opening the new tab was successful
            if (result.success == true) {
                alert('Primary tab successfully opened');
            } else {
                alert('Primary tab cannot be opened');
            }
        };
                   
            function openNewCaseInSubTab() {            
                sforce.console.getEnclosingPrimaryTabId(openSubtab);
            }        
            var openSubtab = function openSubtab(result) {    
                var primaryTabId = result.id;
                var URLValue = "https://cs18.my.salesforce.com/ui/support/servicedesk/ServiceDeskPage#/"+{!NewCaseId}+"?isdtp=vw";
                alert("Value of the URLValue......"+URLValue);
                sforce.console.openSubtab(primaryTabId,'URLValue', true,'New Case', null, openSuccess, 'NewCaseSubtab');
            };        
            var openSuccess = function openSuccess(result) {
                if (result.success == true) {
                    alert('subtab successfully opened');
                } else {
                    alert('subtab cannot be opened');
                }
            };
        </script>
        
        
<apex:form >
  <apex:pageBlock >
     <apex:pageBlockSection >
      <apex:outputPanel id="DisplayEmployeeDetails">
        <apex:outputLabel for="employeeDetails">Employee ID</apex:outputLabel> 
        <apex:inputText id="employeedetails" value="{!employeeid}" />      
      </apex:outputPanel>
      
       <apex:commandButton value="Fetch Data..." action="{!fetchEmployeedetails}" />       
     </apex:pageBlockSection>
    
    <apex:pageBlockSection > 
    <apex:pageBlockTable value="{!Employees}"  var="employee">
        <apex:column value="{!employee.Name}"/>
        <apex:column value="{!employee.Employee_Title__c}"/>
        <apex:column value="{!employee.Nick_Name__c}"/>
        <apex:column value="{!employee.Primary_Phone__c}"/>
     </apex:pageBlockTable>   
    </apex:pageBlockSection>    
 </apex:pageBlock>
 
        <apex:pageBlock mode="maindetail">
           <apex:commandButton action="{!newCase}"   value="New Case"  id="newCase" /> 
        </apex:pageblock>        
</apex:form>
</apex:page>

Apex class:

public class redirecttoconsoletest {

  public List<Test_Employees__c> Employees {get;set;}
  public string employeeid {get; set;}
  public string newCaseId {get;set;}  
  public case emp;
  
  public redirecttoconsoletest (ApexPages.StandardController stdController) {
    // initialize the standard controller
     this.emp = (Case)stdController.getRecord();
  }
  
  public pageReference fetchEmployeedetails() {      
      Employees = [select name, Email_Id__c, Employee_Title__c, Nick_Name__c, Primary_Phone__c from Test_Employees__c where name = :employeeid limit 1];           
       return null; 
     }    

  public pageReference newCase()
  {
  try {
    List<Test_Employees__c> te = [select name, Email_Id__c, Employee_Title__c, Nick_Name__c, Primary_Phone__c from Test_Employees__c where name = :employeeid limit 1];          
    Case newCase = new Case (OwnerId = UserInfo.getUserId(), Status = 'New',
                            TeseCaseName__c = te[0].Email_Id__c, Test_Case_Preferred_ID__c = te[0].Primary_Phone__c);
                          
     insert newCase;
     newCaseId = '/'+newCase.Id;
 PageReference acctPage = new ApexPages.StandardController(newCase).view();
        acctPage.setRedirect(true);
        return acctPage;
   } catch (Exception e) {
        System.debug('*** Exception ***: ' + e);            
       }   
  return null;
 
  }
}

Thanks,
JBabu.
  • May 14, 2015
  • Like
  • 0
Hi,

I want to send some values from from visual force page to "case" object in service console.
I want to open the service console in edit mode (after I click a button on the vf page) with values from vf page to be pre populated.

Can we do the URL hack and do this?

Please let me know the details.

Thanks,
Jagadish.
  • May 08, 2015
  • Like
  • 0

Hi,

 

Salesforce receives inbound request from external system to do real-time updates.

SFDC is giving exception back as

 

<NS1:Fault xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/">
- <detail>
- <NS2:middleWareExceptionMessage xmlns:NS2="...URL....">
<NS2:ExceptionCode>60002</NS2:ExceptionCode>
<NS2:ExceptionSource>Backend System SFDC</NS2:ExceptionSource>
<NS2:ExceptionMessage>Error from backend-SFDC</NS2:ExceptionMessage>
<NS2:ExceptionStackTrace>Backend System Error</NS2:ExceptionStackTrace>
</NS2:middleWareExceptionMessage>
</detail>
</NS1:Fault>

 

Can some one help me what could be the issue?

Also please let me know how to see the inbound request xml coming in to Salesforce.

 

Thanks,

Babu,

  • August 12, 2013
  • Like
  • 0

Hi,

 

Please let me know what is default time out time out value when external system tries to update/insert records using SOAP web services API

Can we customize this, if so to what max value we can do ?

 

SImilary please let me know the default  time out value when external system tries to pull/extract records  from Salesforce using SOAP web services API.

Can we customize this, if so to what max value we can do ?

 

Thanks,

Babu.

  • May 07, 2013
  • Like
  • 0

Hi,

 

I am writing a SOQL query which has formula field in the WHERE clause.

Is there any limitation on number of records which are retrieved?

 

Please let me know the details.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

Hi,

 

Third party system connects to Salesforce via login - user name and pwd and it gets session id and server url.

 

There are multiple servers at third party system.

 

First server connects to Salesforce via user name and password and Saleforce sends session id and server url.

As per the load balancing now server 2 connects to Salesforce instead of server 1.

In this case does Salesforce sends same session id and server url (i.e., when server 1 was connected) when server 2 connects to Salesforce or session id and server url would be different.

 

Please let me know the details.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

1. External system is doing a pull from Salesforce.

 

Sample SOAP request to pull data&colon;

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>QwWsHJyTPW.1pd0_jXlNKOSU</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:query>
<urn:queryString>SELECT Id, Name, BillingStreet FROM Account WHERE Name LIKE '%a%'</urn:queryString>
</urn:query>
</soapenv:Body>
</soapenv:Envelope>

 

How many querystring tags we can use? I wanted to understand if external system has the capability to retrieve mutiple objects data like can we use multiple query strings e.g., 
<urn:queryString>select id, name from Lead</urn:queryString>
<urn:queryString>select id, name from Opportunity</urn:queryString>

What is the limit of this?


2. External system is updating/inserting in to Salesforce.

 

<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId><b>QwWsHJyTPW.1pd0_jXlNKOSU</b></urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:update>
<urn:sObjects xsi:type="urn1:Account"> <!--Zero or more repetitions:-->
<urn1:fieldsToNull><b>NumberOfEmployees</b></urn1:fieldsToNull>
<urn1:fieldsToNull><b>Fax</b></urn1:fieldsToNull>
<urn1:Id><b>001D000000HTK3aIAH</b></urn1:Id>
<!--You may enter ANY elements at this point-->
<Name><b>Acme Rocket Supply, Inc.</b></Name>
</urn:sObjects>
</urn:update>
</soapenv:Body>
</soapenv:Envelope>

 

Can we do multiple operations at a time., 
like updating one object and inserting another object?
Updating and inserting on same object?
What is the limit?

 

Please let me know the response. If possible please share some sample raw snippets.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

1. External system is doing a pull from Salesforce.

 

Sample SOAP request to pull data&colon;

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>QwWsHJyTPW.1pd0_jXlNKOSU</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:query>
<urn:queryString>SELECT Id, Name, BillingStreet FROM Account WHERE Name LIKE '%a%'</urn:queryString>
</urn:query>
</soapenv:Body>
</soapenv:Envelope>

 

How many querystring tags we can use? I wanted to understand if external system has the capability to retrieve mutiple objects data like can we use multiple query strings e.g.,
<urn:queryString>select id, name from Lead</urn:queryString>
<urn:queryString>select id, name from Opportunity</urn:queryString>

What is the limit of this?


2. External system is updating/inserting in to Salesforce.

 

<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId><b>QwWsHJyTPW.1pd0_jXlNKOSU</b></urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:update>
<urn:sObjects xsi:type="urn1:Account"> <!--Zero or more repetitions:-->
<urn1:fieldsToNull><b>NumberOfEmployees</b></urn1:fieldsToNull>
<urn1:fieldsToNull><b>Fax</b></urn1:fieldsToNull>
<urn1:Id><b>001D000000HTK3aIAH</b></urn1:Id>
<!--You may enter ANY elements at this point-->
<Name><b>Acme Rocket Supply, Inc.</b></Name>
</urn:sObjects>
</urn:update>
</soapenv:Body>
</soapenv:Envelope>

 

Can we do multiple operations at a time.,
like updating one object and inserting another object?
Updating and inserting on same object?
What is the limit?

 

Please let me know the responses.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

Hi,

 

I want to query the records which are modified with last 15 mins.

Please let me know the SOQL query for the same. I tried

 

select name from Opportunity

     where SystemModstamp >  Datetime.now().addMinutes(-15)

 

it did not work.

 

I want to run the query using force.com explorer/workbench

Please let me know if there is any other method to get this.

 

Thanks,

Babu.

  • April 26, 2013
  • Like
  • 0

Hi,

 

Third party system wants to connect to Salesforce system. We have shared our enterprise wsdl with them.

Can they connect to Salesforce without having Salesforce user name and password+security token?

 

They are having problems connecting by using Salesforce user name and password and get session id and server url.

 

Please let me know if there any means to connect to Salesforce with out providing Salesforce user name and pasword.

If so, please let me know the details and also please provide if there any links with details on this method.

 

Thanks,

Babu.

  • April 25, 2013
  • Like
  • 0

Hi,

 

Third party system wants to connect to Salesforce system. We have shared our enterprise wsdl with them.

Can they connect to Salesforce without having Salesforce user name and password?

 

They are having problems connecting by using Salesforce user name and password and get session id and server url.

 

Please let me know if there any means to connect to Salesforce with out providing Salesforce user name and pasword.

If so, please let me know the details and also please provide if there any links with details on this method.

 

Thanks,

Babu.

  • April 25, 2013
  • Like
  • 0

Hi,

 

I wanted to understand which option of calling external web service is better?

Is it using 

 

option 1) Get the wsdl of the webservice and parse the wsdl in salesforce

(or)

option 2) Creating a soap envelope and sending the request to endpoint url using httpRequest class and parse the http request.

 

Please let me know?

 

Thanks,

Babu.

  • February 02, 2013
  • Like
  • 0

Hi,

 

I wanted to know which xml parser is best method is it using DOM classes or XmlStreamReader?

And why one is preferred over the other?

 

Thanks,

Babu.

 

  • February 02, 2013
  • Like
  • 0

Hi,

 
I have some "System.debug" statement in my apex test class.. Where can I see the output of these statements in eclipse after executing the test class? I am aware of checkin in salesforce org thru debug logs. But I am not sure how to check in eclipse. Please help me on this.
 

Thanks,
Jbabu.

  • March 28, 2012
  • Like
  • 1
Hi,

I need to invoke the below java script function on the load of VF page in the console

    $(document).ready(function(){
       // Java script function
    });
    
Note: In the console, list view, I click a custom list button and this will pop up the Visualforce page.

In this page the above function is not getting fired automatically.

Thanks,
Babu.
  • June 02, 2015
  • Like
  • 0
Hi,

I have popped a vf page from a button of on the std case page
I am inserting some values from the pop up vf page to the std case page.

But to see the updated values  in the std case page, I need to manually refresh the case.

Is there any way, can that case page be automatically refreshed when the values are inserted in to case object?

Please let me know.

Thanks,
JBabu.
  • May 15, 2015
  • Like
  • 0
Hi,

We have items picklist field on case object.
My business team wants to control the values of the picklist.

We do not want to give them sys admin profile.
Is there any way they can control the picklist values without giving the sys admin profile?
Is there any other profile which can do this? (or) is there any other option?

Thanks,
JBabu.

 
  • May 15, 2015
  • Like
  • 0

Hi,

 

I am writing a SOQL query which has formula field in the WHERE clause.

Is there any limitation on number of records which are retrieved?

 

Please let me know the details.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

Hi,

 

Third party system connects to Salesforce via login - user name and pwd and it gets session id and server url.

 

There are multiple servers at third party system.

 

First server connects to Salesforce via user name and password and Saleforce sends session id and server url.

As per the load balancing now server 2 connects to Salesforce instead of server 1.

In this case does Salesforce sends same session id and server url (i.e., when server 1 was connected) when server 2 connects to Salesforce or session id and server url would be different.

 

Please let me know the details.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

1. External system is doing a pull from Salesforce.

 

Sample SOAP request to pull data&colon;

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>QwWsHJyTPW.1pd0_jXlNKOSU</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:query>
<urn:queryString>SELECT Id, Name, BillingStreet FROM Account WHERE Name LIKE '%a%'</urn:queryString>
</urn:query>
</soapenv:Body>
</soapenv:Envelope>

 

How many querystring tags we can use? I wanted to understand if external system has the capability to retrieve mutiple objects data like can we use multiple query strings e.g., 
<urn:queryString>select id, name from Lead</urn:queryString>
<urn:queryString>select id, name from Opportunity</urn:queryString>

What is the limit of this?


2. External system is updating/inserting in to Salesforce.

 

<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId><b>QwWsHJyTPW.1pd0_jXlNKOSU</b></urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<urn:update>
<urn:sObjects xsi:type="urn1:Account"> <!--Zero or more repetitions:-->
<urn1:fieldsToNull><b>NumberOfEmployees</b></urn1:fieldsToNull>
<urn1:fieldsToNull><b>Fax</b></urn1:fieldsToNull>
<urn1:Id><b>001D000000HTK3aIAH</b></urn1:Id>
<!--You may enter ANY elements at this point-->
<Name><b>Acme Rocket Supply, Inc.</b></Name>
</urn:sObjects>
</urn:update>
</soapenv:Body>
</soapenv:Envelope>

 

Can we do multiple operations at a time., 
like updating one object and inserting another object?
Updating and inserting on same object?
What is the limit?

 

Please let me know the response. If possible please share some sample raw snippets.

 

Thanks,

Babu.

  • April 29, 2013
  • Like
  • 0

Hi,

 

I want to query the records which are modified with last 15 mins.

Please let me know the SOQL query for the same. I tried

 

select name from Opportunity

     where SystemModstamp >  Datetime.now().addMinutes(-15)

 

it did not work.

 

I want to run the query using force.com explorer/workbench

Please let me know if there is any other method to get this.

 

Thanks,

Babu.

  • April 26, 2013
  • Like
  • 0

Hi,

 

Third party system wants to connect to Salesforce system. We have shared our enterprise wsdl with them.

Can they connect to Salesforce without having Salesforce user name and password+security token?

 

They are having problems connecting by using Salesforce user name and password and get session id and server url.

 

Please let me know if there any means to connect to Salesforce with out providing Salesforce user name and pasword.

If so, please let me know the details and also please provide if there any links with details on this method.

 

Thanks,

Babu.

  • April 25, 2013
  • Like
  • 0

Hi,

 

Third party system wants to connect to Salesforce system. We have shared our enterprise wsdl with them.

Can they connect to Salesforce without having Salesforce user name and password?

 

They are having problems connecting by using Salesforce user name and password and get session id and server url.

 

Please let me know if there any means to connect to Salesforce with out providing Salesforce user name and pasword.

If so, please let me know the details and also please provide if there any links with details on this method.

 

Thanks,

Babu.

  • April 25, 2013
  • Like
  • 0

I have tried everything:

 

Developer Console filters set to Error for all except Debug for Profiling

System monitoring everything set to none except Profiling

Apex Class, override and everything set to none excep profiling.

 

 

I still get max log sixed reached and never get to any profiling information. Here is a sample:

 

25.0 APEX_PROFILING,FINE
22:45:46.032 (32459000)|EXECUTION_STARTED
22:45:46.032 (32499000)|CODE_UNIT_STARTED|[EXTERNAL]|066Z00000004uBF|VF: /apex/pv_chem_bgreport_test
22:45:46.587 (587183000)|CODE_UNIT_STARTED|[EXTERNAL]|01pF0000002f6RI|PV_CHEM_BGReportController <init>
22:45:50.894 (4894671000)|CODE_UNIT_FINISHED|PV_CHEM_BGReportController <init>
22:45:50.894 (4894751000)|CODE_UNIT_STARTED|[EXTERNAL]|01pF0000002f6RI|PV_CHEM_BGReportController get(sParticipants)
22:45:50.894 (4894778000)|CODE_UNIT_STARTED|[EXTERNAL]|01pF0000002f6RI|sParticipants
22:45:50.894 (4894794000)|CODE_UNIT_FINISHED|sParticipants

 I thought all of this would be gone. Is that not the case? If so I cannot get around it as it displays ALL the values passed into the methods and there is a lot of data there.

 

 

Here is an example of one line with all the data being passed in showing

 

22:45:51.052 (5052874000)|CODE_UNIT_STARTED|[EXTERNAL]|PV_DemingRegAnalysisController set(objpv,PVReportObjects_Copy:[PTSampleType={c=venipuncture, i=skin puncture}, PVID=a2CF00000004zGqMAI, Panel=null, allPVData=(pvData&colon;[Name=PTINR, Panel=PT, SampleID=19, Units=INR, isOutlier=null, x1=2.7, x2=2.7, y1=2.2, y2=2], pvData&colon;[Name=PTINR, Panel=PT, SampleID=17, Units=INR, isOutlier=null, x1=1.2, x2=1.2, y1=1.1, y2=1.1], pvData&colon;[Name=PTINR, Panel=PT, SampleID=18, Units=INR, isOutlier=null, x1=3.7, x2=3.7, y1=2.8, y2=3.1], pvData&colon;[Name=PTINR, Panel=PT, SampleID=15, Units=INR, isOutlier=null, x1=1.7, x2=1.7, y1=1.5, y2=1.5], pvData&colon;[Name=PTINR, Panel=PT, SampleID=16, Units=INR, isOutlier=null, x1=1.9, x2=1.9, y1=2.1, y2=2], pvData&colon;[Name=PTINR, Panel=PT, SampleID=13, Units=INR, isOutlier=null, x1=1.4, x2=1.4, y1=1.5, y2=1.6], pvData&colon;[Name=PTINR, Panel=PT, SampleID=14, Units=INR, isOutlier=null, x1=1.5, x2=1.5, y1=1.4, y2=1.5], pvData&colon;[Name=PTINR, Panel=PT, SampleID=11, Units=INR, isOutlier=null, x1=2.1, x2=2.1, y1=2, y2=2.2], pvData&colon;[Name=PTINR, Panel=PT, SampleID=12, Units=INR, isOutlier=null, x1=2.9, x2=2.9, y1=3, y2=2.6], pvData&colon;[Name=PTINR, Panel=PT, SampleID=21, Units=INR, isOutlier=null, x1=3.1, x2=3.1, y1=2.4, y2=2.1], ...), anaStatPrecision={actwbt={CV=2, Diff=2, General=0, Intercept=1, Mean=1, R=2, Range=0, SD=2, Slope=1, Sxx=2, ...}, angap={CV=2, Diff=2, 

 This continues on and wraps for another 100 or so lines all for one line in the debug log where the filter is set to none.

 

Anyone have any ideas?

How to de-active  apexclass

Hi,

 

I wanted to understand which option of calling external web service is better?

Is it using 

 

option 1) Get the wsdl of the webservice and parse the wsdl in salesforce

(or)

option 2) Creating a soap envelope and sending the request to endpoint url using httpRequest class and parse the http request.

 

Please let me know?

 

Thanks,

Babu.

  • February 02, 2013
  • Like
  • 0

Hi, We are working of integration with TIBCO and we are facing and issue interms of datatype of the elements sent to TIBCO.

We have built the stub classes and are invoking them, we are getting the response as System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Internal Error faultcode=SOAP-ENV:Server faultactor=. We have passed all the mandatory parameters but still getting this error.

 What might be the possible reasons for getting this error, any info will be helpful.

 

  • January 19, 2012
  • Like
  • 0