• Shakil
  • NEWBIE
  • 25 Points
  • Member since 2005

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 12
    Replies

Hi

 

Not sure where i am doing wrong. Simple one.... I have a string to search

 

 

String searchText = 'Acme'; String wildcardSearchText='%'+ searchText + '%'; string searchquery = 'FIND \'+wildcardSearchText+ \'IN ALL FIELDS RETURNING Account(Id, Name, Type, BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name )'; System.debug('searchquery is '+searchquery ); List<List<SObject>> searchList=search.query(searchquery);

 

 

And the debug log looks like ,.

 

Debug Log: searchquery is FIND '+wildcardSearchText+ 'IN ALL FIELDS RETURNING Account(Id, Name, Type, BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name )

 

 

 

 

When it should have been, FIND *Acme* IN ALL FIELDS RETURNING Account

 

I also tried in the below way and no luck

 

 

String searchText = 'Acme*'; List<List<SObject>> searchList = [FIND searchText '*' IN ALL FIELDS RETURNING Account(Id, Name, Type, BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name)]; Account[] accts= ((List<Account>)searchlist[0]); System.debug('accts result is : '+accts);

 

 

unexpected token: 'searchText'

 

Please advice

  • November 17, 2009
  • Like
  • 0
Hi
I am facing an issue in following scenerio.
1. Account is in Currency Type "AUD"
2. want to update amount in  USD currency (which is corporate currency) 
 
How can I explicitly do it?
 
 
Thanks,
 
Shakil
  • December 01, 2006
  • Like
  • 0

I created a component which contains the gmap API for driving directions.

 

 

<apex:component >
    <apex:attribute name="LocationA" description="Location A" type="String" required="true" />
    <apex:attribute name="LocationB" description="Location B" type="String" required="true" />

    <div id="map_canvas" style="width: 100%; height: 375px; background-color: #ffffff;">

    <script src=" http://maps.google.com/—file=api&amp;v=2.x&amp;
    key=ABQIAAAATLMNChkxHLNMBMyJTWj6NBRI1GHY-WN6xuGUGnsHkEIkRmE15BQKtJjUz7L1VCIpVF7qmtbghbpPAA"
    type="text/javascript"></script>

    <script type="text/javascript">

    var dirFrom = '{!LocationA}';
    var dirTo = '{!LocationB}';

    function initialize() {
        if (GBrowserIsCompatible()){
          map = new GMap2(document.getElementById("map_canvas"));
          directionsPanel = document.getElementById("my_textual_div");
          map.setCenter(new GLatLng(49.496675,-102.65625), 3);
          directions = new GDirections(map, directionsPanel);
          directions.load("from: dirFrom to:dirTo");
          }
}

        var previousOnload = window.onload;            
        window.onload = function() {        
         if (previousOnload) {            
         previousOnload(); }  
        initialize();    }
    </script>
 </div>
</apex:component>

 The page which references the controller:

 

 

 

<apex:page standardController="Account" showheader="false">
  <c:DrivingDirection 
  LocationA="{!Account.BillingPostalCode}+{!Account.BillingState}+{!Account.BillingCountry}" 
   LocationB="{!$User.PostalCode}+ {!$User.State}+ {!$User.Street}">
  </c:DrivingDirection>
</apex:page>

 

 

I am calling this VF page from a custom button.The content source for the button is URL.

But the page is showing blank with a warning that "the page contains non-secure items".

Appreciate any help on the issue.

 

Thanks & Regards,

Norman

 

Hi

 

Not sure where i am doing wrong. Simple one.... I have a string to search

 

 

String searchText = 'Acme'; String wildcardSearchText='%'+ searchText + '%'; string searchquery = 'FIND \'+wildcardSearchText+ \'IN ALL FIELDS RETURNING Account(Id, Name, Type, BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name )'; System.debug('searchquery is '+searchquery ); List<List<SObject>> searchList=search.query(searchquery);

 

 

And the debug log looks like ,.

 

Debug Log: searchquery is FIND '+wildcardSearchText+ 'IN ALL FIELDS RETURNING Account(Id, Name, Type, BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name )

 

 

 

 

When it should have been, FIND *Acme* IN ALL FIELDS RETURNING Account

 

I also tried in the below way and no luck

 

 

String searchText = 'Acme*'; List<List<SObject>> searchList = [FIND searchText '*' IN ALL FIELDS RETURNING Account(Id, Name, Type, BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name)]; Account[] accts= ((List<Account>)searchlist[0]); System.debug('accts result is : '+accts);

 

 

unexpected token: 'searchText'

 

Please advice

  • November 17, 2009
  • Like
  • 0
I'm a bit green with SF.  I need to change the default of a check box before rendering the Contacts page while still using the standard controller. It needs to change based on a vale in the Users table. Can anyone give me some guidance on that? It would be greatly appreciated.

The APEX Language Reference and Force.com Developers Guides (among others) state that the New collection can be written to in a Before Insert trigger.   Unfortunately when I try to do so, I get a 'Collection is read-only' error.   What gives?

 

 Sample code:

 

 

trigger ProductKits on OpportunityLineItem (before insert)
{

 

//test, just add an opportunitylineitem to trigger.new
            OpportunityLineItem bLineItem = new OpportunityLineItem();
                    bLineItem.quantity = 1;
                    bLineItem.UnitPrice = 100.00;
                    bLineItem.Opportunityid = '006S0000002pi1Y';
                    bLineItem.pricebookentryid = '01u80000003LOTJAA4';
            trigger.new.add(bLineItem);

 

}

What is the best way of getting php to run automatic reports and storing the csv files into a folder?

I'm trying to use the Salesforce SOAP API in python to poll for updated items in a Salesforce account. I'm stuck on code that looks like this:

 

pollingInterval = 5 * 60 # 5 minutes

now = s.getServerDatetime()

updatedContacts = s.getUpdated('Contact', now - datetime.timedelta(seconds=pollingInterval), now)

 

where s.getUpdated(...) just calls the SOAP function "getUpdated." I've set the time  range to be starting from 5 minutes in the past and ending at the current moment. This doesn't return any data. The "latestDateCovered" is always several hours in the past. If I set the end date to be some point in the future (such as 100 days), it returns some data, but it returns the same data every 5 minutes. In that case, the "latestDateCovered" is the same as the server time. I tried adjusting for my time zone, as well as daylight savings, but to no avail. Does anyone have any idea what the proper way to do this is?

I have got a connection to the phptool kit ok...

 

but pulling objects and information out of the database is causing some problems

 

 

Pixpay_Registration_Voucher__c
Array ( [0] => SObject Object ( [type] => Pixpay_Registration_Voucher__c [fields] => stdClass Object ( [OwnerId] => 00520000000vSAA2 [IsDeleted] => false [Name] => 716851737094758719 [CreatedDate] => 2008-10-09T16:05:14.000Z [CreatedById] => 00520000000vFALAA2 [LastModifiedDate] => 2009-01-20T17:31:04.000Z [LastModifiedById] => 00520000000vFALAA2 [SystemModstamp] => 2009-01-20T17:31:04.000Z [LastActivityDate] => [Voucher_Status__c] => Sample [Activation_Date__c] => [Value__c] => 20.0 [Voucher_Brand__c] => Ucash [Currency__c] => GBP [Application_Number__c] => [Agent_Name__c] => ) [Id] => a0A20000002ERGHEA4 ) )

Id = a
OwnerId =
Name =
CreatedDate =
CreatedById =
LastModifiedDate =
LastModifiedById =
SystemModstamp =
LastActivityDate =
LastModifiedById =
Voucher_Status__c =
Activation_Date__c =
Value__c =
Voucher_Brand__c =
Currency__c =
Application_Number__c =
Agent_Name__c =
SCREEN PRINT

database table scan

 

 

 

for some reason its just pulling out the first letter of the id?

 

 

//Attachment echo'<br/><b>Pixpay_Registration_Voucher__c</b><br/>'; $query = "SELECT Id, OwnerId, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastActivityDate, Voucher_Status__c, Activation_Date__c, Value__c, Voucher_Brand__c, Currency__c, Application_Number__c, Agent_Name__c from Pixpay_Registration_Voucher__c ORDER BY LastModifiedDate LIMIT 1"; $queryResult = $mySforceConnection->query($query); $records = $queryResult->records; //print_r($records); print_r($records); echo'<br/>'; foreach ($records as $record) { $sObject = new SObject($record); } foreach ($records as $record) { $sObject = new SObject($record); echo "<br/>Id = ".$sObject->Id.""; echo "<br/>OwnerId = ".$sObject->fields->OwnerId.""; echo "<br/>Name = ".$sObject->fields->Name.""; echo "<br/>CreatedDate = ".$sObject->fields->CreatedDate.""; echo "<br/>CreatedById = ".$sObject->fields->CreatedById.""; echo "<br/>LastModifiedDate = ".$sObject->fields->LastModifiedDate.""; echo "<br/>LastModifiedById = ".$sObject->fields->LastModifiedById.""; echo "<br/>SystemModstamp = ".$sObject->fields->SystemModstamp.""; echo "<br/>LastActivityDate = ".$sObject->fields->LastActivityDate.""; echo "<br/>LastModifiedById = ".$sObject->fields->LastModifiedById.""; echo "<br/>Voucher_Status__c = ".$sObject->fields->Voucher_Status__c.""; echo "<br/>Activation_Date__c = ".$sObject->fields->Activation_Date__c.""; echo "<br/>Value__c = ".$sObject->fields->Value__c.""; echo "<br/>Voucher_Brand__c = ".$sObject->fields->Voucher_Brand__c.""; echo "<br/>Currency__c = ".$sObject->fields->Currency__c.""; echo "<br/>Application_Number__c = ".$sObject->fields->Application_Number__c.""; echo "<br/>Agent_Name__c = ".$sObject->fields->Agent_Name__c.""; } echo'<br/>SCREEN PRINT<br/>';

 

 

 

 

 

 

Hi
I am facing an issue in following scenerio.
1. Account is in Currency Type "AUD"
2. want to update amount in  USD currency (which is corporate currency) 
 
How can I explicitly do it?
 
 
Thanks,
 
Shakil
  • December 01, 2006
  • Like
  • 0
I'm curious how others have accomplished the following:

* User updates a record in SalesForce.com.
* SalesForce.com sends an outbound POST/GET or API request to a listener web server hosted by us
* Our custom application then queries the SForce API and grabs the latest data from the SalesForce.com record

I know we could program our application to query salesforce.com for records updated since it's last query, but I'd perfer to know if it's possible to accomplish this.

What would be ideal is a workflow alert that is actually able to submit a POST/GET query to an external web address. Then we could use the existing workflow rules to trigger this sort of thing.

Thanks in advance.
js
Hi all!
https://sandbox.sforce.com/soqltest/index.jsp There was a query builder running on the above mentioned url, but it has stopped working . Can any one please tell where i can find it now, or if there is any alternate to it.
Best Regards
Ahsen Saeed
I have been charged the task of setting up multiple currencies for our organization. I would like to start by running some tests against the Developer Edition account of sforce.com before I activate anything for our organization.

Normally this is done by submitting a case. However, I cannot figure out how to submit a case from the Developer Edition. I don't want to submit a case from my regular org account because I don't want to risk turning it for the wrong Org, especially because it is something that can not be undone.

Does anyone know how to activate features, such as multiple languages and currencies, for the Developer Edition accounts?

Thanks,
Donovan Kruger