• bvramkumar
  • NEWBIE
  • 273 Points
  • Member since 2010

  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 125
    Replies

Hi

can anyone pelase let me know below questions.

 

1. What is the use Javascript Remoting ?

 

2. If more flexible, When we need to use ?

 

3. What is the use of Actionfunction ?

 

4. What is the diffrenece between Actionfunction and Javascript remoting ?

 

5. JS remoting used for mainly calling the APEX method from javascript ? if yes what s the benefits ? can u please let me know real time scanerio ?

 

As of now, I know the js remoting the will be used for calling APEX method from javascript . i just want to know when we need to perform this ?

 

 

Thanks

Vinoth

Hi. I have been trying to make the following code dynamic but it kept on failing?

 

Any help?

journal.Enquiry_Token__c = mappedJournals.get(journal.c2g__Reference__c).Enquiry_Token__c;
journal.End_Date__c = mappedJournals.get(journal.c2g__Reference__c).End_Date__c;
journal.Start_Date__c = mappedJournals.get(journal.c2g__Reference__c).Start_Date__c;
journal.SITS_Old_and_New_Number__c = mappedJournals.get(journal.c2g__Reference__c).SITS_Old_and_New_Number__c;
journal.Sage_QB_Account__c = mappedJournals.get(journal.c2g__Reference__c).Sage_QB_Account__c;

 Thanks

Hi,

 

I create a field set on Account object, and add Account Name, Account Number and Account Description under the "In the Field Set".

 

Then I use the following code to display them on Visualforce.

<apex:page showHeader="false" standardStylesheets="false" sidebar="false" standardController="Account">

  This is your new Page: TestFieldSetPage
  
  <apex:repeat value="{!$ObjectType.Account.FieldSets.POC_Field_Set}" var="f"> 
        <apex:outputText value="{!Account[f]}" /><br/>
  </apex:repeat>
</apex:page>

"POC_Field_Set" is my field set api name.

But I can't see any data on my Visualforce after I save these code.

 

I follow the "Visualforce Developer's Guide" --- Working with Field Sets

 

So, do I miss some import thing about the Field set?

 

Thanks!

 

 

 

Hi all,

 

I'm sure this is possible but I currently can't find the answer so looking for some help or direction.

 

I want to create a drop down in a VF page that is a list of active users with their associated ID so when a user is selected from the dropdown the ID is added to the below query replacing the userinfo.getuserid.  

 

Public static  integer getWeb_Corporate()
    {
    integer Web_Corporate = [SELECT count() FROM Lead where OwnerId =:UserInfo.getUserId() AND LeadSource='Web-Corporate' AND IsConverted = False AND List_Assignment__c != 'Corporate'  LIMIT 1000];
    return Web_Corporate ;
    }    

 


Any help would be appreciated.

Kev 


 

I have a list of values in a pageBlockTable for which when a single column in the table is clicked (this column is displaying commandlinks) a section of the vf page refreshes and several other pageBlockSection are updated via ajax. that is working however, only when I remove the actionsupport... when I include the actionsupport to get the "waiting to complete" gif to show up the entire vf section refreshes and my controller is never called. I've scoured the net and have tried the numerous examples explained on this board to no avail... what am I doing wrong?!

 

Below is my code,. Thanks to all who reply:

 

...<apex:actionStatus id="pleasewait" layout="block">
<apex:facet name="start">
<img src="{!$Resource.AjaxAnimation}" />
</apex:facet> 
</apex:actionStatus>
<!-- List of Financial Accounts --> 
<apex:outputPanel id="finAccounts" layout="block" style="overflow:auto; height:250px;"> 
<apex:pageBlock >



<apex:pageBlockSection showHeader="true" title="Financial Accounts List" columns="1"> 
<apex:pageBlockTable value="{!FinAccts}" var="finAcct" id="finAccountsTable" rowClasses="odd,even" styleClass="tableClass"> 

<apex:column >
<apex:facet name="header">Address</apex:facet>
<apex:actionRegion >
<apex:commandlink value="{!finAcct.address}" action="{!getFinAcctDetails}" reRender="acctDetails, acctTransactions"> 
<apex:actionSupport event="onclick" status="pleasewait" /> 
</apex:commandlink>
</apex:actionRegion> 
</apex:column> 
<apex:column >
<apex:facet name="header">City</apex:facet> 
<apex:outputText value="{!finAcct.city}"/> 
</apex:column>

<apex:column >
<apex:facet name="header">State</apex:facet> 
<apex:outputText value="{!finAcct.state}"/>
</apex:column>

<apex:column >
<apex:facet name="header">Postal</apex:facet> 
<apex:outputText value="{!finAcct.zip}"/>
</apex:column>

<apex:column >
<apex:facet name="header">Country</apex:facet> 
<apex:outputText value="{!finAcct.country}"/>
</apex:column>
</apex:pageBlockTable> 
</apex:pageBlockSection> 
</apex:pageBlock> 
</apex:outputPanel>...

Hi,

 

I just can't seem to get code coverage for Exception handlers! 

 

Can someone please help me? 

 

Below are two code blocks.  The first one is the actual existing TEST script and the second is the controller with the two Exception handlers that never get code coverage which is causing me to only get 72% code coverage!

 

TEST SCRIPT:

private class TestOpportunityDeepCloneController {
    static testMethod void testOpportunityDeepCloneController_test1() {        
        Account testAcc1 = new Account();
        testAcc1.Name = 'Test Account1';
        insert testAcc1 ;
        
        Account testAcc2 = new Account();
        testAcc2.Name = 'Test Account2';
        insert testAcc2 ;
        
        Contact testContact = new  Contact();
        testContact.AccountId = testAcc2.id;
        testContact.FirstName = 'Test';
        testContact.LastName = 'Test'; 
        testContact.Phone = '555-555-5555';
        testContact.Email = 'OppDeepClone@test.com';
        insert testContact;        
        
        Opportunity testOpp = new Opportunity();
        Date closedDate = date.newinstance(2012, 1, 1);
        Date effectiveDate = date.newinstance(2012, 1, 2);
        
        testOpp.Name = 'Test Opportunity1';
        testOpp.AccountId = testAcc1.Id ;
        testOpp.StageName ='Proposal';
        testOpp.CloseDate = closedDate;
        testOpp.GeneralProducer__c = 'Direct';
        testOpp.Effective_Date__c = effectiveDate;
        insert testOpp ;
        
        PricebookEntry proceBookEntry = [ Select p.Name,  p.Id , p.IsActive From PricebookEntry p  where p.IsActive = true limit 1];
        
        OpportunityLineItem testOppProduct = new OpportunityLineItem();
        testOppProduct.OpportunityId = testOpp.id;
        testOppProduct.PricebookEntryId = proceBookEntry.Id;
        testOppProduct.Product_Sold__c = false;
        testOppProduct.Quantity = 10.00 ;
        testOppProduct.TotalPrice = 100.00;
        insert testOppProduct;
        
        Partner testPartner = new Partner();
        testPartner.AccountToId = testAcc2.id;
        testPartner.OpportunityId= testOpp.Id;
        testPartner.IsPrimary=true;        
        insert testPartner;
        
        OpportunityContactRole testConRole = new OpportunityContactRole();
        testConRole.OpportunityId = testOpp.id;
        testConRole.ContactId = testContact.id;        
        insert testConRole;
        
        ApexPages.StandardController sc = new ApexPages.StandardController(testOpp);
        OpportunityDeepCloneController  odcc = new OpportunityDeepCloneController(sc);
        
        
        Pagereference pageRef1 = Page.CloneOpportunityWithProduct ;
        pageRef1.getParameters().put('id', String.valueOf(testOpp.Id));
        pageRef1 = odcc.cloneWithProduct();
        
        System.assert(odcc.cloneWithProduct() != null);
        System.assert([select Id from Opportunity where Id=:odcc.newOpportunityId ].size() == 1);
        
        PageReference pageRef2 = Page.CloneOpportunityWithoutProduct ;
        pageRef2.getParameters().put('id', String.valueOf(testOpp.Id));
        pageRef2 = odcc.cloneWithoutProduct();
          
        System.assert(odcc.cloneWithoutProduct() != null);
        System.assert([select Id from Opportunity where Id=:odcc.newOpportunityId ].size() == 1);        
    }    
}

 

CONTROLLER:

public without sharing class OpportunityDeepCloneController {
    
    /* Instantiate  private /public valiables, properties */
    private ApexPages.StandardController controller { get; set; }
    private Opportunity opportunity { get; set; }
    public Id newOpportunityId { get; set; }
    OpportunityProcessorManager oppManager = new OpportunityProcessorManager();
    
    /* constructor */
    public OpportunityDeepCloneController(ApexPages.StandardController controller) {
            this.controller = controller;
            this.opportunity = (Opportunity)controller.getRecord();
    }

/*
* @purpose : The public method used to clone Opportunity with Product. This is called by the VF page 'CloneOpportunityWithProduct'
* @param :
* @return: PageReference  
*/
    public PageReference cloneWithProduct(){
        
         system.debug('Opportunity to be cloned with Product :' + opportunity);
         // setup the save point for rollback
         Savepoint sp = Database.setSavepoint();
         try{
            this.opportunity = QueryBase.getOpportunityById(opportunity.id);
            Opportunity newOpportunity = oppManager.cloneOpportunityWithProduct(opportunity);
            this.newOpportunityId = newOpportunity.id;
         }
         catch (Exception e){
            // roll everything back in case of errors
            Database.rollback(sp);
            ApexPages.addMessages(e);
            return null;
         }
        return new PageReference('/'+newOpportunityId );    
    }
 
/*
* @purpose : The public method used to clone Opportunity without Product. This is called by the VF page 'CloneOpportunityWithoutProduct'
* @param :
* @return: PageReference  
*/    
    public PageReference cloneWithoutProduct(){
        
        
         system.debug('Opportunity to be cloned without Product :' + opportunity);
         // setup the save point for rollback
         Savepoint sp = Database.setSavepoint();
         try{
            this.opportunity = QueryBase.getOpportunityById(opportunity.id);
            Opportunity newOpportunity = oppManager.cloneOpportunityWithoutProduct(opportunity);
            this.newOpportunityId = newOpportunity.id;
         }
         catch (Exception e){
            // roll everything back in case of errors
            Database.rollback(sp);
            ApexPages.addMessages(e);
            return null;
         }
        return new PageReference('/'+newOpportunityId );        
    }
}

 

 

 

 

 

 

Hello All,

I am using the Work bench's REST Explorer to get the details of User doing Report Export activity. The query I am using is: /services/data/v32.0/query?q=SELECT+Id+,+EventType+,+LogFile++,+LogDate+,+LogFileLength+FROM+EventLogFile+WHERE++LogDate+>+Yesterday+AND+EventType+=+'ReportExport'

I do not get any records after executing this request. I have tried this on my developer org and executed the above request after doing some Export activity on reports. I have followed the article: http://releasenotes.docs.salesforce.com/en-us/winter15/release-notes/rn_forcecom_security_elf.htm#topic-title regarding Event monotoring. This particular user activity does not appear in Setup Audit Trial as well. Can some help if I am doing something wrong Or give some insight?

Thanks,
Vishnu

Hi,

 

I am trying to communicate with a webservice hosted in one of the sandbox Org.s using SOAPUI(desktop tool). This tool gives me the below request structure

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sl="http://soap.sforce.com/schemas/class/XXXXXXXXXXXXXXXX">
   <soapenv:Header>
      <sl:AllowFieldTruncationHeader>
         <sl:allowFieldTruncation></sl:allowFieldTruncation>
      </sl:AllowFieldTruncationHeader>
      <sl:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <sl:categories>
            <sl:category></sl:category>
            <sl:level></sl:level>
         </sl:categories>
         <sl:debugLevel></sl:debugLevel>
      </sl:DebuggingHeader>
      <sl:CallOptions>
         <sl:client></sl:client>
      </sl:CallOptions>
      <sl:SessionHeader>
         <sl:sessionId>XXXXXXXXXXX!AQgAQDClDsbFptrQ5zWifnhNyIf2WI4HwvF49kZbOUr7Y59MTSPnUZCuHUULR7T8gbIs239c9Df0yXg5PYsUl.ixIuRqA4ji</sl:sessionId>
      </sl:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <sl:updateAssetRecords>
         <!--Zero or more repetitions:-->
         <sl:Asset_Utilization>
            <!--Optional:-->
            <sl:Fusion_Id>12345</sl:Fusion_Id>
            <!--Optional:-->
            <sl:Product_SKU>12345</sl:Product_SKU>
            <!--Optional:-->
            <sl:UtilizationBucket1>12345</sl:UtilizationBucket1>
            <!--Optional:-->
            <sl:UtilizationBucket2>12345</sl:UtilizationBucket2>
            <!--Optional:-->
            <sl:UtilizationBucket3>12345</sl:UtilizationBucket3>
            <!--Optional:-->
            <sl:UtilizationBucket4>12345</sl:UtilizationBucket4>
            <!--Optional:-->
            <sl:UtilizationBucket5>12345</sl:UtilizationBucket5>
            <!--Optional:-->
            <sl:UtilizationBucket6>12345</sl:UtilizationBucket6>
            <!--Optional:-->
            <sl:UtilizationDescription>12345</sl:UtilizationDescription>
         </sl:Asset_Utilization>
      </sl:updateAssetRecords>
   </soapenv:Body>
</soapenv:Envelope>

When I am submitting the above request it returns me the below response with Error message in it.

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Client</faultcode>
         <faultstring>'' is not valid for type xsd:boolean, should be '0', '1', 'true' or 'false'</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

 

Can someone please help me to resolve the error?

 

 

A Question to the boarders:
If I am using apex:include to include 4 VF pages in another VF page, Will it take governor limits for each separately Or is it combined? And suppose that those 4 VF pages have their own controllers. I think the limits are separate for each page. Like to know what others think about this. Probably someone has a solid answer....

 

Thanks.... 

Hi Pals,

 

I am getting a possibly weird issue while doing lead converstion to an acount.

 

I have trigger on Account, that should copy the ownerId into another lookup-to-user field if the ownerId is a user(Not a Queue). Now... this works fine if the users are directly creating the accounts but fails while doing lead conversion.

 

The test case is,

1. Create a Lead

2. Click on Convert.

3. Change the Account Owner field to any user other than current user and proceed with Conversion. This will fire a trigger on Account Insert.

4. Now, what I expected in my trigger is the correct ownerId set by the user, But for a reason I have been unable to find, it always set the ownerId to current user.

 

Now you may think tha my code is wrong. Thats what I thought and reviewed my code hundred times and a hundred debugs. What I found from debug logs is that, it does not take the Account owner set by the user but always takes the current User. I searched boards but did not find any similar problem/solution.

 

You might also think there many some other triggers or workflows running after my trigger which are resetting the field in which i am expecting the correct value, but there is one and only one Account trigger and no workflows etc.

 

I am lost and cant find a reason for this issue. Please help... and it will be greatly appreciated.

 

Thanks

Vishnu

Hi Pals,

 

Is it possible to parse/process file uploaded( for e.g. a .csv file) in apex and and fetch records? From what I know, when a file is uploaded from suppose a VF page, we will receive a Blob of that file. But there is no mechanism as such to parse that Blob and see what data is exactly is inside it. I know this I/O processing can be easily done in .Net/Java. But usually a .Net/Java solutions is not what a customer expects because of the extra hosting/costing/whatever the other reasons. So, I want to know if this possible in Apex at all ? I searched boards and also IdeaExchange but did not find any confident answer. Any help is very much appreciated.

 

Thanks

Vishnu

Hi Everyone,

 

I observerd that there are so many products on AppExchange that does the Integration of Quickbooks with the SFDC. But i could not find any standard procedure on community through which I can achieve this Integration. I have followed some of the Quickbooks formus and tried some code snippets with no success. I found it painfull to figure out the exact procedure of the Integration. Can anyone who has worked on the integration help me understand how the Quickbooks API works. I am determined, even if i get the information in pieces, I will put them together at one place and post that to the community. So, whoever has worked on the Integration of Quickbooks with SFDC,  please share your valuable experience.

 

Thanks,

Vishnu

Hi

 

I have a trigger on FeedItem that is responsible for reposting the chatter file to a respective record of a custom object based on the feed text entered by the user(User is expected to post from Home/Chatter tab). The way i am doing the reposting inside the trigger is... I am inserting a new feed item with parentId equals to the Id of the record to which i want this feed to be reposted(I have avoided the recursion there).

 

This trigger works for very small files (few KBs) but fails for bigger files. In case of large files, the reposting is happening(I can see the reposting happening in Debug Log), but the Original post insert which gets paused while reposting... fails. Can anyone please tell me why is it behaving this way? Please let me know if you did not understand my problem or need more explaination.

 

Thanks

Vishnu

Hello,

 

Has anybody worked on sites pages that uses Linvio PaymentConnect without redirecting to it's SiteCheckout page.

 

Thanks,

Vishnu

Hello,

 

Has anybody worked on sites pages that uses Linvio PaymentConnect without redirecting to it's SitesCheckout page.

 

Thanks,

Vishnu

I am facing the below issue while fetching the layout for account using SOAP tool. Kindly let me know how to solve this error. I have succesfully login via SOAP tool got the session id but while describing the layout I am getting the below error:

 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header>
     
      <urn:SessionHeader>
         <urn:sessionId>Gau7XKaiaOertNGQf6UAkJiLTzNWDaW9TjrL6vq56kHRXC4yQpRj8_LLq3DZih2</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:describeLayout>
         <urn:sObjectType>Account</urn:sObjectType>
         <urn:layoutName>Account Layout</urn:layoutName>
         </urn:describeLayout>
   </soapenv:Body>
</soapenv:Envelope>
*************************************************************************
Error:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>UNKNOWN_EXCEPTION</faultcode>
         <faultstring>UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService</faultstring>
         <detail>
            <sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">
               <sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode>
               <sf:exceptionMessage>Destination URL not reset. The URL returned from login must be set in the SforceService</sf:exceptionMessage>
            </sf:UnexpectedErrorFault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

Please reply in case you have solution .
Hello,

I am trying to simulate the MAX function on the roll-up summary fields with the trigger below but I am getting an error that my aggregate variable on line 18 is not recognized.  Can any suggest how I can fix this to write the Maximum value of the custom field Max_Deliv__c on my OpportunityLineItem object to the related Opportunity object field Max_Deliv__c?  Thanks,

trigger UpdateMaxDeliv on OpportunityLineItem(before update) {

Set <Id> Opp_Ids = new Set<Id>();
	for (OpportunityLineItem oli1: trigger.new){
		Opp_Ids.add(oli1.Id);
	}

List<AggregateResult> maxDeliv = [SELECT Max(Max_Deliv__c) deliv
								  FROM OpportunityLineItem];
								  
	for(AggregateResult aggOli : maxDeliv);{
 
		List<Opportunity> opp1 = [SELECT Id, Max_Deliv__c
								  FROM Opportunity
								  WHERE Id in :Opp_Ids];

			for(Opportunity o: opp1){
				o.Max_Deliv__c = aggOli.get('deliv');
			}
			update opp1;
		}
}


  • July 26, 2014
  • Like
  • 0
i used a standard query of approval history which gives status of approval from workbench for community ,when i am executing it as administration it is working but when i tried it in community its not working means the page is working but it is not displaying data.please tell wheather the standard query works for customer community.if works tell me how.please as soon as possible

Hi,

I have a VF page with controller and in this controller it contain a Wrapper class which is displaying the value apex:pageBlocktable. I have a print button which call a another Vf page where i need to display some values from Wrapper class. I try to use the same controller from both 2 VF pages but it don't work because i call the class and refresh all the values in the class. So i wrote another controller for print VF page but i am not able to pass the values from Wrapper class. Is their any method to do it. Or if their is any other idea, i am open to new idea.

Thanks 

I am  trying to generate class from following wsdl but it is reflecting error

" Unable to find complexType for {http://soap.sforce.com/schemas/class/CTSWebService}User "

 

 part1:

 

<?xml version="1.0" encoding="UTF-8"?>
<!--
 Web Services API : CTSWebService
-->
<definitions targetNamespace="http://soap.sforce.com/schemas/class/CTSWebService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.sforce.com/schemas/class/CTSWebService">
 <types>
  <xsd:schema elementFormDefault="qualified" targetNamespace="http://soap.sforce.com/schemas/class/CTSWebService">
   <xsd:element name="DebuggingInfo">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="debugLog" type="xsd:string"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:simpleType name="ID">
    <xsd:restriction base="xsd:string">
     <xsd:length value="18"/>
     <xsd:pattern value="[a-zA-Z0-9]{18}"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="LogCategory">
    <xsd:restriction base="xsd:string">
     <xsd:enumeration value="Db"/>
     <xsd:enumeration value="Workflow"/>
     <xsd:enumeration value="Validation"/>
     <xsd:enumeration value="Callout"/>
     <xsd:enumeration value="Apex_code"/>
     <xsd:enumeration value="Apex_profiling"/>
     <xsd:enumeration value="Visualforce"/>
     <xsd:enumeration value="System"/>
     <xsd:enumeration value="All"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="LogCategoryLevel">
    <xsd:restriction base="xsd:string">
     <xsd:enumeration value="Internal"/>
     <xsd:enumeration value="Finest"/>
     <xsd:enumeration value="Finer"/>
     <xsd:enumeration value="Fine"/>
     <xsd:enumeration value="Debug"/>
     <xsd:enumeration value="Info"/>
     <xsd:enumeration value="Warn"/>
     <xsd:enumeration value="Error"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:complexType name="LogInfo">
    <xsd:sequence>
     <xsd:element name="category" type="tns:LogCategory"/>
     <xsd:element name="level" type="tns:LogCategoryLevel"/>
    </xsd:sequence>
   </xsd:complexType>
   <xsd:simpleType name="LogType">
    <xsd:restriction base="xsd:string">
     <xsd:enumeration value="None"/>
     <xsd:enumeration value="Debugonly"/>
     <xsd:enumeration value="Db"/>
     <xsd:enumeration value="Profiling"/>
     <xsd:enumeration value="Callout"/>
     <xsd:enumeration value="Detail"/>
    </xsd:restriction>
   </xsd:simpleType>

Hi,

 

I am trying to communicate with a webservice hosted in one of the sandbox Org.s using SOAPUI(desktop tool). This tool gives me the below request structure

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sl="http://soap.sforce.com/schemas/class/XXXXXXXXXXXXXXXX">
   <soapenv:Header>
      <sl:AllowFieldTruncationHeader>
         <sl:allowFieldTruncation></sl:allowFieldTruncation>
      </sl:AllowFieldTruncationHeader>
      <sl:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <sl:categories>
            <sl:category></sl:category>
            <sl:level></sl:level>
         </sl:categories>
         <sl:debugLevel></sl:debugLevel>
      </sl:DebuggingHeader>
      <sl:CallOptions>
         <sl:client></sl:client>
      </sl:CallOptions>
      <sl:SessionHeader>
         <sl:sessionId>XXXXXXXXXXX!AQgAQDClDsbFptrQ5zWifnhNyIf2WI4HwvF49kZbOUr7Y59MTSPnUZCuHUULR7T8gbIs239c9Df0yXg5PYsUl.ixIuRqA4ji</sl:sessionId>
      </sl:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <sl:updateAssetRecords>
         <!--Zero or more repetitions:-->
         <sl:Asset_Utilization>
            <!--Optional:-->
            <sl:Fusion_Id>12345</sl:Fusion_Id>
            <!--Optional:-->
            <sl:Product_SKU>12345</sl:Product_SKU>
            <!--Optional:-->
            <sl:UtilizationBucket1>12345</sl:UtilizationBucket1>
            <!--Optional:-->
            <sl:UtilizationBucket2>12345</sl:UtilizationBucket2>
            <!--Optional:-->
            <sl:UtilizationBucket3>12345</sl:UtilizationBucket3>
            <!--Optional:-->
            <sl:UtilizationBucket4>12345</sl:UtilizationBucket4>
            <!--Optional:-->
            <sl:UtilizationBucket5>12345</sl:UtilizationBucket5>
            <!--Optional:-->
            <sl:UtilizationBucket6>12345</sl:UtilizationBucket6>
            <!--Optional:-->
            <sl:UtilizationDescription>12345</sl:UtilizationDescription>
         </sl:Asset_Utilization>
      </sl:updateAssetRecords>
   </soapenv:Body>
</soapenv:Envelope>

When I am submitting the above request it returns me the below response with Error message in it.

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Client</faultcode>
         <faultstring>'' is not valid for type xsd:boolean, should be '0', '1', 'true' or 'false'</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

 

Can someone please help me to resolve the error?

 

 

Hi All,

 

Does anyone know a way to connect salesforce to different databases? MS SQL etc? We have a number of databases that we need to pull together in salesforce. It need to be automatic so a way to use apex would be idea. Any ideas?

 

Thanks.

Hi. I have a VFpage which mimics the layout of an object in my org. The intention is to have a custom Add and Save button on the create/edit screen.

 

The VFpage is as follows:

<apex:page standardController="Call__c" extensions="TimesheetFindSOQL">
<apex:sectionHeader title="Call__c Edit" subtitle="{!Call__c.name}"/> 
<apex:form > 
<apex:pageBlock title="Call__c Edit" mode="edit">

<!--buttons for the VFpage at the top-->

<apex:pageBlockButtons location="top">
<apex:commandButton value="Save" action="{!save}"/> 
<apex:commandButton value="Save & New" action="{!save}" /> 
<apex:commandButton value="Cancel" action="{!cancel}"/> 
</apex:pageBlockButtons>

<!--buttons for the VFpage at the bottom-->

<apex:pageBlockButtons location="bottom"> 
<apex:commandButton value="Save" action="{!save}"/> 
<apex:commandButton value="Save & New" action="{!save}" /> 
<apex:commandButton value="Cancel" action="{!cancel}"/> 
</apex:pageBlockButtons>

<!--Fields from Call object with mandatory/non-mandatory flag indicators-->

<apex:pageBlockSection title="Information" columns="2"> 
<apex:inputField value="{!Call__c.Account__c}" required="true"/> 
<apex:inputField value="{!Call__c.Timesheet__c}" required="true"/>
<apex:inputField value="{!Call__c.Contact__c}" required="false"/> 
<apex:inputField value="{!Call__c.RecordTypeId}" required="false"/> 
<apex:inputField value="{!Call__c.Call_Date__c}" required="false"/> 
<apex:inputField value="{!Call__c.Call_Category__c}" required="false"/> 
<apex:inputField value="{!Call__c.Call_Notes__c}" required="false"/> 

</apex:pageBlockSection>

</apex:pageBlock>
</apex:form>
</apex:page>

Tthe aim here is to populate 

 

<apex:inputField value="{!Call__c.Timesheet__c}" required="true"/>

with the result of some SoQL.

 

I have a class, but my issue is what on earth to do with these two entities:

 

public with sharing class TimesheetFindSOQL {

    public TimesheetFindSOQL(ApexPages.StandardController controller) {

    }

//instance variable
public Timesheet__c record {get; set;}

//class constructor
public TimesheetFindSOQL() {
  List<Timesheet__c> records = [Select Id, Name From Timesheet__c WHERE Week_Beginning__c = 2013-03-25];
  if(!records.isEmpty()) {
    record = records.get(0);
        }
    record = records.get(1);

    }
}

 Where do I go from this point?

 

Hi

can anyone pelase let me know below questions.

 

1. What is the use Javascript Remoting ?

 

2. If more flexible, When we need to use ?

 

3. What is the use of Actionfunction ?

 

4. What is the diffrenece between Actionfunction and Javascript remoting ?

 

5. JS remoting used for mainly calling the APEX method from javascript ? if yes what s the benefits ? can u please let me know real time scanerio ?

 

As of now, I know the js remoting the will be used for calling APEX method from javascript . i just want to know when we need to perform this ?

 

 

Thanks

Vinoth

Hi

I need to assigen one event to mutliple contacts in my vf page

my scenario is :in the vf page if i select add(button) to enter the event details

I have one more button 'add contacts',

in the click of that button i have to select some contacts

 

If i save the records,i have to assigen that event to the all the selected contact.

 

here i write the vf page and class ,in my code only the first one inserting but it not assigening the multiple contacts.

 

 

this is the vf page


<apex:page standardController="Contact" extensions="ADD_Showings_To_Contact">
<apex:form >
<apex:pageBlock >
 <apex:commandLink value="Add New Showing" action="{!addshwoing}"  />
  <apex:pageBlockTable value="{!ev}"  var="e">
<apex:column headerValue="Subject">
        <apex:inputField value="{!e.Subject}"/>
        
    </apex:column>
    
    <apex:column headerValue="Name" >
        <apex:inputField value="{!e.WhoId}" />
    </apex:column>
    <apex:column headerValue="Start Date Time">
        <apex:inputField value="{!e.StartDateTime}"/>
    </apex:column>
    <apex:column headerValue="End Date Time">
        <apex:inputField value="{!e.EndDateTime}"/>
    </apex:column>
    <apex:column headerValue="Location">
        <apex:inputField value="{!e.Location}"/>
    </apex:column>
    
    <apex:column headerValue="Summary">
        <apex:inputField value="{!e.Summary__c}"/>
    </apex:column>
    
    <apex:column headerValue="Description">
        <apex:inputField value="{!e.Description}"/>
    </apex:column>
    
</apex:pageBlockTable>
<apex:commandLink value="Add New Contact" action="{!addnewcontact}"  />
 <apex:pageBlockTable value="{!evt}"  var="et" rendered="{!addshwoingcntbtn}">
 <apex:column headerValue="Name" >
        <apex:inputField value="{!et.WhoId}" />
    </apex:column>
    </apex:pageBlockTable>

<apex:pageblockSection columns="1" >
       <apex:pageblockSectionItem >
                <apex:commandButton action="{!addshowingsavemethod}" id="saveButton" value="Save" />
                
                     </apex:pageblockSectionItem>
            </apex:pageblockSection>
</apex:pageBlock>
</apex:form>
</apex:page>




this is my class



public class ADD_Showings_To_Contact {
public id conid{get;set;}
Contact con =new contact();
public list<Event> ev{get;set;}
public list<Event> evt{get;set;}
public event  addevent{get;set;}
public boolean addshwoingbtn{get;set;}
public boolean addshwoingcntbtn{get;set;}

    public ADD_Showings_To_Contact(ApexPages.StandardController controller) {
 conid= apexpages.currentpage().getparameters().get('id');
   con=[SELECT AccountId,stage__c,name,Email,Phone from contact where id=:conid];
         ev=new list<Event>();
                ev=[select WhatId,Subject,StartDateTime,Location,EndDateTime,Description,ShowAs from event where WhoId=:conid];
                 evt=new list<Event>();
evt=[select WhatId,Subject,StartDateTime,Location,EndDateTime,Description,ShowAs from event where WhoId=:conid];
    }
    public void addshwoing()
    {
 
       ev.add(new event());      
    }
    
     public void addnewcontact()
    {
    evt.add(new event());
    addshwoingcntbtn=true;
    }
     public pagereference addshowingsavemethod()
    {
    try{
     insert ev;
     insert evt;
        system.debug('insert the addevent records'+ev);
        system.debug('insert the addeventsss records'+evt);
        ev=null;
        evt=null;
        }
        catch(Exception e)
        {system.debug(e);}
         pagereference pr=new pagereference('/apex/opportunitytab?id=conid');
    return pr;
        }
}

 

 

Can one help me

Thanks to advance.

 

 

venkatesh.

Hello All,

 

I have created one site which is login enabled for customer portal user. This Users are having "High Volume Customer Portal" as profiles assign to it.

 

I checked which all standard objects can be viewed by this profile and don't have Opportunity in that.

 

But even though when my class which is without sharing is able to access and perfrom all sorts of DML operation on that object.

 

This is salesforce bug or I am making some mistake over here. My goal was to access Opportunity Standard Object in Site(Customer Portal Login Enabled) 

 

Please advise.

 

Thanks

on executing a class I am getting the value from external system , that value is in the constructor  .... but i need to assign that particular value to a visualforce page field   

 

Thanks in advance 

  • April 10, 2013
  • Like
  • 0

Hi,

 

 I have a small doubt,

 

1) I am building a site for a exam which is internal to the orgn , How to restrict the site based on organisation ip,

 

2) The site should to be visible only to specific ip (within orgn)

 

Please tell me how to do it

 

Thanks in advance

Hi,

 

I'm looking for a trigger which copy the lookup filed from grand parent and paste it on the grandh child is created..

please help me on this...

Please any body help me how can i make a field readonly using triggers

Can anyone explain what this means? This is a error occurs on an sControl that was working fine until recently. It was working on March 5, 2012. This error comes up when trying to enter a Value into a lookup field on an s-control.

 

Error: {faultcode:'soapenv:Client', faultstring:''' is not valid for the type xsd:double', }