• nishwal
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I have tried to Group By a number field in SOQL query and it was giving me error of field cant be used in query call.   So i checked the documentation for Group By clause and found that  - 

 

 The Field object associated with DescribeSObjectResult has a groupable field that defines whether you can include the field in a GROUP BY clause.

 

As its a number field in that original object itself so i feel that i should be able to Group records by it.  I am able to use Group by clause for text fields. When i check this groupable value for that text field - its true and for this number field its false.

 

So i am wondering -

1. If this problem is associated with datatype or related to that particular field?

2. how this groupable field's value is controlled and is there any way we can change its value? 

I have created a multiistep approval process. End User facing problem while approving the record  - It redirects user to all togather a new screen having message - You can't perform operation with the selected user type.

 

I have seen this message first time so dont have any idea that whats the actual problem. User have all the access rights to see this records.

 

Please help me to figure out the root cause of this problem and how to resolve it?

There is a Record Creater User A  with timezone is Timezone A and Record Viewer is another User B with TimezoneB.  

 

I have a custom object with Datetime field. When i fetch this record using SOQL for User B, SF gives the Datetime value in GMT with respect to the creator user's timezone and i wanted to get the absolute value that i have entered. I didnot find any way to identify in which timezone i have created that record. 

 

Can anybody tell me that how can i fetch that a record is created in which timezone?

 If @isTest(SeeAllData=false) working for anyone?

I have annotated the class as well as the method but the testmethod can see the existing data.

Here is simple code snippet. Assertion is getting failed for me...

@isTest(SeeAllData=false)
private class testAnnotationSeeAllData {

static testmethod void myUnitTest()
{
Test.startTest();
List<User> lstUsers = [Select Id, Name From User Where IsActive= true Limit 100];
System.assert(lstUsers.size() == 0);
Test.stopTest();
}
}

tried in api version 24 and 25 both. and Developer Org and Sandbox.


is there anyone who is experiencing the same problem?

i have declared a class which have some optional properties. When i doesnt define that property and serialize it using json.serialize method, the result json string contains the entry for that property with null value.

How to avoid adding this property while serializing it?

 

 

I am trying to install force.com plugin in eclipse but every time it gives me a error

 

=================================================================================

An error occurred while collecting items to be installed

session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 7251ab037ae632a5a9835c7c07210451 and found 8c7e6d7546fcba86d6f73baca118b896.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 44db36699ca7fdd38917fced4e63c3b3 and found a272621d18edfe9be7ee1f36c69fee0a.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 6d87eb2e76e7e19f7b709682e5272dfc and found 47547a9904d916cd1304f209cd4c262c.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.ui.editors,24.0.0.201202291629.

MD5 hash is not as expected. Expected: ff45a840737d9bef14347ce6f5b5daa4 and found 6a27945c28562fc2568e51f9a16bc976.

====================================================================================

 

I have tried to install it eclipse 3.6 and 3.7 SR1 both. is anyone else also facing same issue?

 

and is there any workaround to come out of this problem?

I have designed a VF page and there is a section to generate a new task.  So i wonder is there any way that i can just embed the Task Standard Paglayout in my VF Page as i dont want to hardcode the layout. Apart from that i have multiple layouts assigned to different different profile and my VF page will be accessed by all these profile .

 

So if there is no other way, then i have generate a section for each profile and render them accordingly. but if there is any change in the pagelayout then i have to modify my VF page also. so i dont want to use this approach.

 

If anybody have any solutuion then please help me.

I have a business process(Lead Process) that is controlling picklist values for Standard filed Status in lead. Now i want to fetch picklist values that are available at the time of lead conversion for that business process in apex.

 

When i am querying picklist values using this query

 

SELECT Id , MasterLabel FROM LeadStatus WHERE IsConverted='1'

 

it gives all the picklist values for the Converted Status not particularly for that business process.

 

Can anyone help me on this?

 If @isTest(SeeAllData=false) working for anyone?

I have annotated the class as well as the method but the testmethod can see the existing data.

Here is simple code snippet. Assertion is getting failed for me...

@isTest(SeeAllData=false)
private class testAnnotationSeeAllData {

static testmethod void myUnitTest()
{
Test.startTest();
List<User> lstUsers = [Select Id, Name From User Where IsActive= true Limit 100];
System.assert(lstUsers.size() == 0);
Test.stopTest();
}
}

tried in api version 24 and 25 both. and Developer Org and Sandbox.


is there anyone who is experiencing the same problem?

There is a Record Creater User A  with timezone is Timezone A and Record Viewer is another User B with TimezoneB.  

 

I have a custom object with Datetime field. When i fetch this record using SOQL for User B, SF gives the Datetime value in GMT with respect to the creator user's timezone and i wanted to get the absolute value that i have entered. I didnot find any way to identify in which timezone i have created that record. 

 

Can anybody tell me that how can i fetch that a record is created in which timezone?

i have declared a class which have some optional properties. When i doesnt define that property and serialize it using json.serialize method, the result json string contains the entry for that property with null value.

How to avoid adding this property while serializing it?

 

 

I am trying to install force.com plugin in eclipse but every time it gives me a error

 

=================================================================================

An error occurred while collecting items to be installed

session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 7251ab037ae632a5a9835c7c07210451 and found 8c7e6d7546fcba86d6f73baca118b896.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 44db36699ca7fdd38917fced4e63c3b3 and found a272621d18edfe9be7ee1f36c69fee0a.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 6d87eb2e76e7e19f7b709682e5272dfc and found 47547a9904d916cd1304f209cd4c262c.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.ui.editors,24.0.0.201202291629.

MD5 hash is not as expected. Expected: ff45a840737d9bef14347ce6f5b5daa4 and found 6a27945c28562fc2568e51f9a16bc976.

====================================================================================

 

I have tried to install it eclipse 3.6 and 3.7 SR1 both. is anyone else also facing same issue?

 

and is there any workaround to come out of this problem?

 when able to install for force. com ide through eclipse it displays error message.

help me..

 

n error occurred while collecting items to be installed
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,24.0.0.201202291629.
MD5 hash is not as expected. Expected: 7251ab037ae632a5a9835c7c07210451 and found f5322e82ea38f9bb422e8ca66c8cfd8c.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,24.0.0.201202291629.
MD5 hash is not as expected. Expected: 44db36699ca7fdd38917fced4e63c3b3 and found 0c60b35f796e17a5be500c8a2bd4b706.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,24.0.0.201202291629.
MD5 hash is not as expected. Expected: 6d87eb2e76e7e19f7b709682e5272dfc and found a5cdc09598587cab18abca1fe1b4e553.

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,23.0.2.201201091635.
MD5 hash is not as expected. Expected: 97a6329f82c422a61e9b1bc28be7cace and found 4562884c881d373fff00f5327681282e.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,23.0.2.201201091635.
MD5 hash is not as expected. Expected: 1ac3f44231f25642a46a91575f99faf1 and found 24e09f0550b86f50eb3e5433ca99879e.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,23.0.2.201201091635.
MD5 hash is not as expected. Expected: e4d7099184e8010c5d235e7f328b2c31 and found 721696f7d9b0056372f2ce130e44480d.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.ui,23.0.2.201201091635.
MD5 hash is not as expected. Expected: cf409d62722bc8e419709caeacd8b92d and found d2ec095ffd5410f6a26738ca2b42bd7f.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.ui.editors,23.0.2.201201091635.
MD5 hash is not as expected. Expected: bc626099cbc7fa208f9c5ffcebce4854 and found 5df6b483cb9772f28ea9587fba724841.

Hi,

i have this trigger (worked fine) - but i cant figure out how to create a testclass to go with it. Can anyone help me please?

this trigger is update Account object (custom lookup field - Related_Contract_Number__c) with the contractnumber from the Contract object when few criteria will change.

 

Here is my trigger (worked fine) - it does seems to work but i cant get the testmethod.

 

trigger ContractNumUpdate on Contract (after update) {

    List<ID> AccIds = New List<ID>();
    for(Contract c : Trigger.new)
    {
        if(c.Status == 'Act' && c.Type__c == 'MS' && c.ContractNumber !=null)
        {
            AccIds.add(c.AccountId);
        }
    }
   
    List<Account> accList = [Select Id, Related_Contract_Number__c from Account where Id in :AccIds];
    Map<id,Contract>accContract = New Map<id,Contract>();
    for (Contract con : Trigger.new)
    {
        accContract.put(con.AccountId,con);
    }
   
   
    for(integer i=0; i < accList.size(); i++)
    {
        accList[i].Related_Contract_Number__c = accContract.get(accList[i].Id).Id;
    }
    update accList;
}

I have designed a VF page and there is a section to generate a new task.  So i wonder is there any way that i can just embed the Task Standard Paglayout in my VF Page as i dont want to hardcode the layout. Apart from that i have multiple layouts assigned to different different profile and my VF page will be accessed by all these profile .

 

So if there is no other way, then i have generate a section for each profile and render them accordingly. but if there is any change in the pagelayout then i have to modify my VF page also. so i dont want to use this approach.

 

If anybody have any solutuion then please help me.

I have a business process(Lead Process) that is controlling picklist values for Standard filed Status in lead. Now i want to fetch picklist values that are available at the time of lead conversion for that business process in apex.

 

When i am querying picklist values using this query

 

SELECT Id , MasterLabel FROM LeadStatus WHERE IsConverted='1'

 

it gives all the picklist values for the Converted Status not particularly for that business process.

 

Can anyone help me on this?

The Web Services API Developers Guide says the following...

 

Use the BusinessProcess object to offer different subsets of picklist values to different users for the LeadStatus, CaseStatus, and OpportunityStage fields. Similar to a RecordType, a BusinessProcess identifies the type of a row in a Case, Lead, or Opportunity and implies a subset of picklist values for these three fields. The values for the remaining picklist fields are driven off of RecordType.

 

What it doesn't give is an EXAMPLE of HOW we can use the BusinessProcess object to determine the subset of picklist values. Can I get some guidence on this one?