• S_2013
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 26
    Replies

Hi ..... It states in Salesforce Apex docs that I can get fields for a particular SObject (standard or custom) in the following way:
Map<String, Schema.SObjectField> M = Schema.SObjectType.Custom__c.fields.getMap();

But this requires hardcoding. as I need to hardcode the API name of the SObject : Schema.SObjectType.<CUSTOM__C> -- hardcoding.

Isnt there any way to access all fields on an SObject dynamically w/o hardcoding? I am getting a list of all SObjects in my org by calling Schema.getGlobalDescribe(), but this leaves me with API names of individual SObjects. There is no way to get all those SObject's field info dynamically. Am I missing something or it is just not possible?

 

i.e. I would want to have something like:

List <Schema.SObjectField> fieldList = Schema.SObjectType.get(SObject_API_Name).fields;

Please guide.

 

Regards

S_2013

  • November 26, 2013
  • Like
  • 0

Hi .. I have a simple summary report with about 10 columns, grouped by Name column. But when I export the report, I see Name has become the Last column in the excel. Is this the default behavior or there are ways to overcome it?

 

Regards

S_2013

  • November 12, 2013
  • Like
  • 0

Hi.... below is the code for a test class I am writing. What I see is that, the static block is being called TWICE instead of once, once ecah time at the beginning of execution of both my test methods. Can anyone plz point out why is his so? i.e. since it is static, it should be loaded only one, when the class itself is loaded isnt it?

 

public class SomeTest {
    
    static someVar=null;
    
    static {
        prepareTestUserData();
    }
    
    static testMethod void method1Test(){
        
        
    }
    
    static testMethod void method2Test(){
        
        
    }
    
    public static void prepareTestUserData() {
        System.debug('I am called');
        //initialization code for someVar
    }
}

 

many thanks

Sankalita

  • October 23, 2013
  • Like
  • 0

Hello,

Anyone ever came across this exception while Apex deveopment? The starneg part of this is that, it seems to be an ORACLE error so it must be coming straight from SFDC DB itself.

Here is how it get the error:

I am writing a Unit Test on an Account AFter Delete where I want to locate all the reparented opportunities as a result of MERGE ACCOUNTS operation, and thereafter update their names with the names their new parents(Winning accounts in merge).

Acct A = 60 Opp, Acct B = 60 Opp, Acct C= 60 Opp, after merge A = winning acct so B and C's opp will be updated by 'A' + something.

But on update of opportunitiesI get the aboev exeption. here is the stack trace. FieldsMandatoryFromStageAssessment is a V Rule on Opportunity that uses VLookup. Anyway I shouldnt be crossing SFDC limits as I am doing the update of Opportunity in batches of 200.... anyone can throw some light please?

 

05:02:30.513 (41513620000)|USER_DEBUG|[48]|DEBUG|Error while updating Opportunity while merging accounts:FIELD_CUSTOM_VALIDATION_EXCEPTION: Validation Formula "FieldsMandatoryFromStageAssessment" Invalid (common.exception.SfdcSqlException: ORA-01795: maximum number of expressions in a list is 1000


select /*VLOOKUP Query*/ *
from (select TO_NUMBER(vlookup_main.val1) "vlookup_main.00Ni00000096mZ4.s",
vlookup_main.name "vlookup_main.Name.f"
from (SELECT /*+ no_merge */
(SELECT vlookup_inner.ROWID AS "ROW_ID"
from core.search_name_lookup ind, core.custom_entity_data vlookup_inner
where (ind.name = keys.s2)
and (ind.organization_id = '00Dc0000001M4RY')
and (ind.key_prefix = ?)
and (ind.name_type = ?)
and (ind.entity_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 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?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
and (vlookup_inner.organization_id = '00Dc0000001M4RY')
and (vlookup_inner.custom_entity_data_id = ind.entity_id)
and (upper(vlookup_inner.name) = upper(keys.s1))
and (vlookup_inner.deleted = '0')
and (vlookup_inner.key_prefix = ?)
and (ROWNUM = 1)
) AS "ROW_ID"
FROM TABLE(CAST(? AS STRING_STRING_ARRAY)) keys) snl_result, core.custom_entity_data vlookup_main
where (snl_result.ROW_ID = vlookup_main.ROWID)))

 

  • October 23, 2013
  • Like
  • 0

Hi,

 

On merging accounts, the Opportunity's Account Name is updated.(OOTB SFDC)

So as per my understanding this should trigger Opportunity Workflows of time "Every Time edited".

But that isnt the case when I am merging accounts, as, a field update WF on Opportunity is not being triggered when I merge accounts.

Can anyone please point out what am I missing?

 

  • October 21, 2013
  • Like
  • 0

Hi,

I have a strange scenario that one of my Schedulable Apex jobs starts and finishes in less than 6 minutes, but still, on Monitoring > Debug Logs i see the Duration printed every time as 2,147,483,647 ms, which is the max possible integer value.

 

The job duration cannot be more than 5 * 60 * 1000 = 300000 ms but everytime i run the ob it prints exactly the same output. I searched in Apex workbooks but couldn't find anything relevant... can anyone please throw some light if possible?

 

P.S. My Schedulable job DOES spawn a Batchable job with a preset batch size. (but the entire duration of the Batchable + Schedulable jobs is < 6 minutes)

 

Thanks in advance

S_2013

  • October 07, 2013
  • Like
  • 0

Hi,

 

Please let me know if static resourec is part of data or or config?

i.e. if I refresh my developer sandbox from Prod, will I have to copy the data in Static Resources from that in Prod (I have some excel files uploaded in zip format) OR will they automatically get copied from PROD?

I cannot actually DO the refresh and test it myself now as sandbox cannot be refreshed now... hence asking...

 

Many thanks for answering

S_2013

  • October 03, 2013
  • Like
  • 0

Hello... I am trying to migrate a custom APP from one sandbox to another but cant seem to find the way to do it though Eclipse IDE. Can anyone please help?

  • August 26, 2013
  • Like
  • 0

Hi,

 

My Prod had initially 10 user licenses so all my Sandboxes had provision for creating 10 active users.

Now additionally 20 more licenses have been purchased for Prod. Production shows 20 free licenses but that doesnt reflect in any of the sandboxes and they all show 0 remaining.

Please help. What can I do to make the licenses reflect? Is environment refresh the only possible way?

 

Regards

Sankalita

 

I am trying to deploy 3 reports and 6 dashboard components (2 on each underlying report) when I get this starnge error:

The values of chartSummary and/or groupingColumn are not compatible with the autoselectColumnsFromReport mode for ColumnStacked

 

But the issue is that, the autoselectColumnsFromReport is false(as it should be) and my stacked bar chart in the dashboards have the correct groupings and summerizing and are in sync with the underlying reports(they work fine in source system)

The target system has NO reports and dashboards so no question of any conflict.

Did anyone face similar issue?

 

Thanks in advance

Sankalita

I see there is a Best Practices discussion for this (http://boards.developerforce.com/t5/Best-Practices-Discussion/Hiding-inactive-Contacts/m-p/60760#M4571) but What I would want to know is that, is it possible to hide the contacts based on a criteria based sharing rule from the owners of their parent accounts as well?

 

Contact OWD is private. I have a status field on Contact and I share only those Contacts with my org people if they are of status = Active.

But this sharing rule is overriden when I, am the account owner. I can still see the Inactive Contact if I am the owner of the account.

I tried to change the OWD for Contacts to Private AND Contacts under Accounts to Private as well but no use.

Can anyone please help me?

Hi

I am not beign able to lookup a Campaign that I myself created, from Primary Campaign Source on Opportunity.

Campaign status is Active.

No filtered lookup etc on this field Primary Campaign Source. Can anyone please throw some light on this...

Regards

Sankalita

Hi,

 

My requirement is to send an email once a year, which will be not on any particluar object, rather a generic email, sent ONLY once, per year. My understanding is that, I have to use Messaging.SingleEmailMessage and Messaging.sendEmail from apex as I cannot use WF (if i use WF, then multiple mails will be sent for each object matching rule criteria, which is not the objecive).

Can you pls state that my understanding is correct?

 

Thanks in advance

Sankalita

Please help me i am thoroughly confused...

 

Account a = new Account (Name = 'San Clone');
insert a;
Contact c = new Contact (Lastname = 'Chatterjee', AccountId=a.Id);
insert c;
Contact cdeep = c.clone(false, true);
Contact cshallow = c.clone(false, false);
insert cdeep; insert cshallow;
The code here is creating 3 seperate contact objects but all refering to one single account... so what does this word in Apex documentation mean? "The optional opt_IsDeepClone argument determines whether the method creates a full copy of the sObject field, or just a reference:

  • If set totrue, the method creates a full copy of the sObject. All fields on the sObject are duplicated in memory, including relationship fields. Consequently, if you make changes to a field on the cloned sObject, the original sObject is not affected."

Hi,

This must be a silly question, but I am not able to override help link for a standard object (e.g. Opportunity) with a VF page although for custom object it is pretty easy. Kindly help me

Regards

Sankalita

Hi guys... I have a system with about 1500 opportunities and there is a field that I need to display on report on Opportunities that must get calculated dynamically.

So one way would be to write a nightly job to update this field in midnight, and display to client.

Another way will be NOT to keep this field on Opportunity object and to use a VF report to dynamically calculate the value and display to client.

My question is, how much detrimental is it for the system to have a nightly job that processes about 1500-2000 Opp. records?

Hi,

I have around 15 field updates through WF that update Opportunity record, and also a trigger that works after update of opportunity. (I cannot incorporate the field update logic into my trigger due to various reasons). Now everytime the Opportunity is updated, the trigger is fired, and then the WF field update happens that fires the trigger a second time which is giving absolutely undesired. I tried creating a flag field on Opportunity that tracks if the trigger is fired from a WF field update, but even that doesn't help, as, I cannot reset back the field (i cant do that from after update block of trigger).

Any suggestions will be greatly helpful.

Regards

Sankalita

Hi,

I need to clone an opportunity at a particular future date. I need this cloning to happen automatically (no button click etc. ) on a scheduled date (which is a date field on the opportunity itself. Is schedulable job the only option? Can I manage the initiation with WF?

Regards

Sankalita

Hello,

Anyone ever came across this exception while Apex deveopment? The starneg part of this is that, it seems to be an ORACLE error so it must be coming straight from SFDC DB itself.

Here is how it get the error:

I am writing a Unit Test on an Account AFter Delete where I want to locate all the reparented opportunities as a result of MERGE ACCOUNTS operation, and thereafter update their names with the names their new parents(Winning accounts in merge).

Acct A = 60 Opp, Acct B = 60 Opp, Acct C= 60 Opp, after merge A = winning acct so B and C's opp will be updated by 'A' + something.

But on update of opportunitiesI get the aboev exeption. here is the stack trace. FieldsMandatoryFromStageAssessment is a V Rule on Opportunity that uses VLookup. Anyway I shouldnt be crossing SFDC limits as I am doing the update of Opportunity in batches of 200.... anyone can throw some light please?

 

05:02:30.513 (41513620000)|USER_DEBUG|[48]|DEBUG|Error while updating Opportunity while merging accounts:FIELD_CUSTOM_VALIDATION_EXCEPTION: Validation Formula "FieldsMandatoryFromStageAssessment" Invalid (common.exception.SfdcSqlException: ORA-01795: maximum number of expressions in a list is 1000


select /*VLOOKUP Query*/ *
from (select TO_NUMBER(vlookup_main.val1) "vlookup_main.00Ni00000096mZ4.s",
vlookup_main.name "vlookup_main.Name.f"
from (SELECT /*+ no_merge */
(SELECT vlookup_inner.ROWID AS "ROW_ID"
from core.search_name_lookup ind, core.custom_entity_data vlookup_inner
where (ind.name = keys.s2)
and (ind.organization_id = '00Dc0000001M4RY')
and (ind.key_prefix = ?)
and (ind.name_type = ?)
and (ind.entity_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 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?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
and (vlookup_inner.organization_id = '00Dc0000001M4RY')
and (vlookup_inner.custom_entity_data_id = ind.entity_id)
and (upper(vlookup_inner.name) = upper(keys.s1))
and (vlookup_inner.deleted = '0')
and (vlookup_inner.key_prefix = ?)
and (ROWNUM = 1)
) AS "ROW_ID"
FROM TABLE(CAST(? AS STRING_STRING_ARRAY)) keys) snl_result, core.custom_entity_data vlookup_main
where (snl_result.ROW_ID = vlookup_main.ROWID)))

 

  • October 23, 2013
  • Like
  • 0

Hi,

 

On merging accounts, the Opportunity's Account Name is updated.(OOTB SFDC)

So as per my understanding this should trigger Opportunity Workflows of time "Every Time edited".

But that isnt the case when I am merging accounts, as, a field update WF on Opportunity is not being triggered when I merge accounts.

Can anyone please point out what am I missing?

 

  • October 21, 2013
  • Like
  • 0

Hi,

I have a strange scenario that one of my Schedulable Apex jobs starts and finishes in less than 6 minutes, but still, on Monitoring > Debug Logs i see the Duration printed every time as 2,147,483,647 ms, which is the max possible integer value.

 

The job duration cannot be more than 5 * 60 * 1000 = 300000 ms but everytime i run the ob it prints exactly the same output. I searched in Apex workbooks but couldn't find anything relevant... can anyone please throw some light if possible?

 

P.S. My Schedulable job DOES spawn a Batchable job with a preset batch size. (but the entire duration of the Batchable + Schedulable jobs is < 6 minutes)

 

Thanks in advance

S_2013

  • October 07, 2013
  • Like
  • 0

Hi,

 

Please let me know if static resourec is part of data or or config?

i.e. if I refresh my developer sandbox from Prod, will I have to copy the data in Static Resources from that in Prod (I have some excel files uploaded in zip format) OR will they automatically get copied from PROD?

I cannot actually DO the refresh and test it myself now as sandbox cannot be refreshed now... hence asking...

 

Many thanks for answering

S_2013

  • October 03, 2013
  • Like
  • 0

Hello... I am trying to migrate a custom APP from one sandbox to another but cant seem to find the way to do it though Eclipse IDE. Can anyone please help?

  • August 26, 2013
  • Like
  • 0

I am trying to deploy 3 reports and 6 dashboard components (2 on each underlying report) when I get this starnge error:

The values of chartSummary and/or groupingColumn are not compatible with the autoselectColumnsFromReport mode for ColumnStacked

 

But the issue is that, the autoselectColumnsFromReport is false(as it should be) and my stacked bar chart in the dashboards have the correct groupings and summerizing and are in sync with the underlying reports(they work fine in source system)

The target system has NO reports and dashboards so no question of any conflict.

Did anyone face similar issue?

 

Thanks in advance

Sankalita

I see there is a Best Practices discussion for this (http://boards.developerforce.com/t5/Best-Practices-Discussion/Hiding-inactive-Contacts/m-p/60760#M4571) but What I would want to know is that, is it possible to hide the contacts based on a criteria based sharing rule from the owners of their parent accounts as well?

 

Contact OWD is private. I have a status field on Contact and I share only those Contacts with my org people if they are of status = Active.

But this sharing rule is overriden when I, am the account owner. I can still see the Inactive Contact if I am the owner of the account.

I tried to change the OWD for Contacts to Private AND Contacts under Accounts to Private as well but no use.

Can anyone please help me?

Hi

I am not beign able to lookup a Campaign that I myself created, from Primary Campaign Source on Opportunity.

Campaign status is Active.

No filtered lookup etc on this field Primary Campaign Source. Can anyone please throw some light on this...

Regards

Sankalita

Hi,

 

My requirement is to send an email once a year, which will be not on any particluar object, rather a generic email, sent ONLY once, per year. My understanding is that, I have to use Messaging.SingleEmailMessage and Messaging.sendEmail from apex as I cannot use WF (if i use WF, then multiple mails will be sent for each object matching rule criteria, which is not the objecive).

Can you pls state that my understanding is correct?

 

Thanks in advance

Sankalita

My first question, Is it possible to add a remote site dynamically through apex ?

 

Regardless of the answer, I still tried to achieve this by using Metadata API within Salesforce. Below is my code.

 

public static void createremoteSiteSettings()
{
MetadataService.MetadataPort service = createService();
MetadataService.RemoteSiteSetting remoteSiteSettings = new MetadataService.RemoteSiteSetting();
//remoteSiteSettings.fullName = 'Test';
remoteSiteSettings.url = 'http://www.google.com';
MetadataService.AsyncResult[] results = service.create(new List<MetadataService.Metadata> { remoteSiteSettings });
}

public static MetadataService.MetadataPort createService()
{
MetadataService.MetadataPort service = new MetadataService.MetadataPort();
service.SessionHeader = new MetadataService.SessionHeader_element();
service.SessionHeader.sessionId = UserInfo.getSessionId();
return service;

 

I am getting this error : System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Must specify a {http://www.w3.org/2001/XMLSchema-instance}type attribute value for the {http://soap.sforce.com/2006/04/metadata}metadata element faultcode=soapenv:Client faultactor=

 

Any help would be appreciated ! 

 

Using this code I can get a list of my objects

 

 

Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();

 

 

I can look through that list and get the Schema.SObjectType

 

Now I want to display the fields within that SObjectType in a manner similar to

 

Map<String, Schema.SObjectField> M = Schema.SObjectType.Account.fields.getMap();

 

The problem is in that last example Account is static, where I need to use a variable to designate the proper SObject Type since I will be looping through them.

Hi,

I am trying to migrate profiles from one salesforce org to the other through eclipse. I have included all possible components in the project from the source org and when I deploy the profile to the target development org using the 'deploy to server wizard' of eclipse. It deploys on the profile on the target org but there are certain mismatches in the deployed profile. These mismatches are related to tabviibilities, standard object permissions and general user permissions. 

Is there a bug here in the metadata deployment of profiles or am I missing something here ?

Thanks in advance.