• Saania
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 32
    Replies

Hello,

I am trying to get my query to only return Accounts that have a client Id as well as opportunities that are in stage 6 or have a client id.

 

This is what I have so far:

 

Select a.Website, a.Sub_Status__c, a.Status__c, a.Official_Name__c, a.Name, a.Industry, a.Id, a.Client_ID__c,

(Select o.Id, o.Name, o.StageName, o.AccountId From Opportunities o Where o.StageName = '6 - Closed/Won' Or o.Account.Client_ID__c != NULL ),

a.Business_Unit__c, a.BillingStreet, a.BillingState, a.BillingPostalCode, a.BillingCountry, a.BillingCity,

a.D_U_N_S__c, a.Tax_Number__c, a.Owner.Name, a.Owner.EmployeeNumber, a.Company_Reg__c, a.Channel_Owner__c From Account a

 

The above returns me all of the accounts for our company and joins the opportunities that are either stage 6 or have a client id. 

 

What I need the query to do is return only Accounts with a client ID as well as Accounts that have an opportunity in Stage 6 or opportunities that have a client ID.

 

If I add a where clause at the end of the main select such as WHERE a.Client_ID__c !=NULL, I get all the accounts that have client ids but I miss the accounts that have an opportunity in stage 6 that don't have a client ID.

 

I am really hoping someone out here can help me out.

 

Thank you,

 

I am trying to do a nested SOQL statement. I want to have a query that I order by descending to find the biggest number and then use that number to only find the records with that number. So one part of the nested query will find the largest number and then I will use that number to show only the records that have number.

 

 

I can find the value with this query

 

 

Select Height__c 

from Person__c

Order By Height__c desc limit 1 

 

Just wondering if i can get this value to compare the rest of the records and display the results thanks. 

 

Thanks  

Message Edited by intern2424 on 11-02-2009 07:36 AM
Hi,

I am getting the error specified as the subject when i create a Campaign in VC#. There is no issue of access rights in this case for sure, since I am the System Administrator.

The code is pretty simple. I just create a Campaign object, and call binding.create method with the campaign object as an sObject array. The binding is correct, because I am using it to query the Campaign object earlier as well, that returns correct results

Thanks,
Hi,

I am creating a piece of code that adds campaign members to selected campaign via a UI in VC#.

the Campaign can have many members (obviously more than 200 in most cases), when I use binding.create() method to create an instance (or even an array) of CampaignMember object(s), I get an error ...

'EXCEEDED_ID_LIMIT: record limit reached. cannot submit more than 200 records'

Any suggestion for a work around would definately help.

Thanks,
Hi,

I am trying to update an already exiting trigger in production. I have done the 'ant deploy' procedure several times earlier as well, but this time I am getting this error:

On ant deploy: Failed to login: Unable to serialize property of 'classes' on type common.api.soap.wsdl.CompileandTestResult.
and On ant delete:Failed to login: Unable to serialize property of 'runstestsresults' on type common.api.soap.wsdl.CompileandTestResult.

Thanks.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11">

Hi,


Is there any way to get current date and time as per the logged in user time zone in apex?

I used System.now(), but its returning as per GMT time zone. I need it as per the user time zone.Like if logged in use time zone is Singapore time zone then it should return current time and date  as per the Singapore time zone which is GMT+8,  not as per the GMT time zone. 


Thanks and Regards,

Rajan Jasuja


I have just started using SalesForce and am having trouble getting the update Account Sample to work.
 
 

//create the account object to hold our changes

sforce.sObject updateAccount = new sforce.sObject();

//need to have the id so that API knows which account to update

//set a new value for the name property

updateAccount.Id = "0016000000hkyAAN";

System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

System.Xml.XmlElement nameElement = doc.Xml.XmlElement("Name");

 

nameElement.InnerText = "New Account Name from Update Sample";

updateAccount.Any = new System.Xml.XmlElement[] { nameElement };

updateAccount.type = "Account";

sforceP.SforceService binding = Utility.GetPartnerBinding (this.Context);

//call the update passing an array of object

sforce.SaveResult[] saveResults = binding.update(new sforceP.sObject[] { updateAccount });

 

System.Xml.XmlDocument doc  does not have a member doc.Xml.XmlElement

Can somebody advise

many thanks

HI,

The statement I want to execute is ... 'Clients that did not have a sale last FY, but did buy a product in last 3 years'.

That is, if a client bought a product in FY 2005, but not in FY 2007 (which was the previous FY), I want the client to show up in the list.

In my SQL Server table, we were using the DISTINCT and EXIST statements to retrieve such clients. The clients were matched on the products they bought and the fice(a unique id for the client). But the allsls (All Sales) table can have multiple entries for the same fice and product, for a given client.

In SOQL since these statements are not available, how to accomplish this?

The SQL statement is as:

Code:
SELECT distinct sc.fice, sc.state, sc.product
FROM dbo.allsls AS sc (NOLOCK)
      WHERE sc.trxdate BETWEEN '07/01/2004' AND '06/30/2006'  -- Colleges bought 3 to 4 FY ago (2005-2006) (i.e. not last FY year, but last 3)
AND NOT EXISTS (SELECT t1.product FROM dbo.allsls as t1 (NOLOCK)
                WHERE t1.product = sc.product AND t1.fice = sc.fice
                AND t1.trxdate BETWEEN '07/01/2006' AND '06/30/2008' -- Didn't buy current FY (2008) or prev FY (2007) 
                )

 I would definately appreciate any help to solve this query.

Thanks,

Hi all,

    I want to know whether we can implement the Import functionality in Apex like Salseforce.com has
provided for importing data from xls files.

If yes what are the available ways to get local machine file contents  in Salesforce.com? Are there any  APIs
in Salesforce.com to read buffer data  from remote  client  or it uses HTTP to transfer data?


Any pointers in the regard will be helpful.

Thanks in advance.
Hi

I'm trying to create a workflow rule that will update a field in an assoicated object.

Basically, I have an object called album.
This album has a payment, but occassionally the album can't be produced, so we need the customer to create a second album.  Seeing as they've already paid for the first album, they don't pay for the second album.
The payment stays associated with the first album, and because the first album can't be produced, the payment will remain as 'unfulfilled'.

I'm trying to create a workflow rule that will update the first album as being completed, when the second album is completed.
This way we can determine whether the payment has been honoured and we don't owe any product for the initial payment.

I've tried creating a look-up relationship between the two album objects (custom object), but this doesn't seem to work as I can't update a field in the first album based on a field in the second album.

I've also tried creating a credit custom object that essentially transfers the payment between the two albums, but this won't work either.

I'm using Salesforce Enterprise Edition.

Any help or advice would be great

thanks


Message Edited by nicksquash on 03-17-2008 03:41 PM
Hi,
 
Is there a not like clause in SOQL.
 
Can we write a query like
Select id, firstname from contact where firstname not like 'manas%'
 
Thanks in advance.
I was hoping that SFDC would add time based rule evaluation to the workflow capabilities.  That is, to run workflow rules without requiring the record to be modified first to trigger the rule.
 
My example is we allow some accounts be have a protected status as long as they have certain activity in a certain time period.  I've created the field that shows the days since said qualified activity occured, I have a workflow that will change the protected status based on the value in that qualified activity age field.
 
However, the rule only runs when someone modifies the account, so accounts can be falsely protected simply by not editing them.
 
I'm trying to find a way to make this rule run periodically without the modification.
 
Any suggestions?
 
Thanks,
 
Michael