• rakeshrockb123
  • NEWBIE
  • 49 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 9
    Replies

Hello all,

 

I want all sobject names with matching field name. For ex:  I need all the object names which has field My_field__c.  I tried following snippet in execute anonymous , but it blowing off saying

 Too many fields describes: 101

 

Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
List<String> objNames = new List<String>();
for(sObjectType s : gd.values()){
if(s.getDescribe().fields.getMap().containsKey('My_field__c')){

objNames.add(s.getDescribe().getName());
}
}

for(String s: objNames){
System.debug('*****' + s);
}

 

 

Is there any other way to achieve this ? ...

 

Yout help is very much appreciated.. 

Hi All,

I'm trying to import salesforce records directly into Oracle database table.

When i use

class="com.salesforce.dataloader.dao.database.DatabaseConfig" inside database-conf.xml, i'm recieving 

Cannot Create Poolable Connection Factory <IO Exception:

Network adaptor could not establish the connection error. 

 

But when i use

class="com.salesforce.lexiloader.dao.database.DatabaseConfig" inside database-conf.xml, i'm recieving

class doesn't exist.

 

Do i need to install lexiloader.jar file? .

HI all,

I'm trying to export Activity History records for Opportunity Object. I dont find Activity History object in Data Loader.

Any help would be greatly appreciated.

 

Thanks in Advance,

Rakesh

HI,

I have written my first trigger and class ,and this is moving to production next week.

I want to deploy this in my other sandbox (where by default it is not running test methods as production does). And i want to make sure this deployment will go similar to production.

Can you please guide me how shall i deploy to TEST sandbox and forcing it to run test methids as it in produciton.

 

And one more thing!!..is there any way to skip running test method while deploying in production?

 

Thanks in advance.

Hi All,

When i was going through documentation, i've struck at following :

 

"A Force Platform object cannot be the master in one relationship and the detail in another
relationship
. An object can be the master in more than one relationship, but Force Platform
relationships cannot be used to implement multiple levels of detail."

 

But i created a  custom object (say ABC) which i defined a field with master detail relation to Account Object. And again , ifor other object (say CDE) I can able to create a custom field with master detail relation to ABC Object .

How come the above statement is true?   

HI,

I have to create 16 lookup fields pointing to account object which inturn filter to "ABC" record type.

But this kind of filter (that filters record type) are limited to only 5 fields per object. And after 5 fields i dont have option of exclusive filter , but i can still use the filter, but users can see all the accounts by clicking, " Show all results" .

Can any one please guide me how to overcome this?

HI,

I'm working on a requirement, where sales users can edit the field until users from other profile click the custom buttom called "approved to legal", once the button is clicked, sales users can no more edit the field (read only). 

 

I appreciate your ideas .......

 

Thanks,

Rocky

I am getting this error when logging via SF 1 desktop browzer via "/one.one.app" Lightning Experience is enabled for your organization, but not yet for you. Want to give it a try? Ask your Salesforce admin. 
https://cs21.salesforce.com/ui-global/lightning/accessDenied.jsp

Hi All,

I'm trying to import salesforce records directly into Oracle database table.

When i use

class="com.salesforce.dataloader.dao.database.DatabaseConfig" inside database-conf.xml, i'm recieving 

Cannot Create Poolable Connection Factory <IO Exception:

Network adaptor could not establish the connection error. 

 

But when i use

class="com.salesforce.lexiloader.dao.database.DatabaseConfig" inside database-conf.xml, i'm recieving

class doesn't exist.

 

Do i need to install lexiloader.jar file? .

Hello,

 

The picklist field Forcast Category is not available for edit, and I am also not able to edit its value.

I am the admin, and this was done on purpose some time back, and not able to recollect how to undo it??

 

It is visible and read only is not checked for my profile

 

Thanks

Mitesh

HI all,

I'm trying to export Activity History records for Opportunity Object. I dont find Activity History object in Data Loader.

Any help would be greatly appreciated.

 

Thanks in Advance,

Rakesh

Hi All,

When i was going through documentation, i've struck at following :

 

"A Force Platform object cannot be the master in one relationship and the detail in another
relationship
. An object can be the master in more than one relationship, but Force Platform
relationships cannot be used to implement multiple levels of detail."

 

But i created a  custom object (say ABC) which i defined a field with master detail relation to Account Object. And again , ifor other object (say CDE) I can able to create a custom field with master detail relation to ABC Object .

How come the above statement is true?   

HI,

I'm working on a requirement, where sales users can edit the field until users from other profile click the custom buttom called "approved to legal", once the button is clicked, sales users can no more edit the field (read only). 

 

I appreciate your ideas .......

 

Thanks,

Rocky

I am trying to write a soql query to return objects based on a datetime field on the object. When I try to use any of the comparison operators on the datetimes ( <, = ) I get the error "No viable alternative at character ' ' " which is ever so helpful in usual salesforce style. The error points at the comparison operator. How can I compare dates in a soql query?
Message Edited by Praetorian65 on 10-01-2009 03:38 AM
Hi, I'm trying to develop a trigger that checks a document number format (validation digit), so I need to use the Math.mod method in ApexCode but I found it seems to reject the Double variable as Argument. Here is the related code:
 
Code:
trigger AccountDigitoVerificacion_tgr on Account (before insert, before update) {
    if (Trigger.new.size() > 1 ) { // bulk process only
    }else{    
        Integer DIV = 0;
        Double DocNumber = 0;
        Boolean Calculate = false;
                
        for (Account MyAccount : System.Trigger.new) {
            if(MyAccount.RecordTypeId=='012T0000000CiygIAC' || MyAccount.RecordTypeId=='012T0000000CissIAC'){
                DocNumber = MyAccount.Document_Number__c;
                if(System.Trigger.isInsert){
                    Calculate = true;
                }else{
                    if(System.Trigger.isUpdate){
                        for (Account MyAccountOld : System.Trigger.old) {
                            if(MyAccount.Document_Number__c!=MyAccountOld.Document_Number__c){
                                Calculate=true;
                            }
                        }
                    }
                }
                if(Calculate==true){ // Calculates the validation digit
                    Integer M=0;
                    Integer S=1;
                    for(;DocNumber!=0;DocNumber=Math.floor(DocNumber/10)){
                        // Here is where the code validator shows an Error : S+Math.mod(DocNumber, 10)
                        S=Math.mod((S+Math.mod(DocNumber, 10)*(9-Math.mod(M++,6))), 11);
                    }
                    MyAccount.Validation_Digit__c = S?S-1:'k'; 
                }
            }
        } 
    }
}

 I tried inserting a value in the first argument directly and it works, but, when I replace it by a variable, it shows the following error (NO MATTER the value source):
"Method does not exist or incorrect signature: Math.mod(Double, Integer)".
 
Any suggestion to correct it or replace that function??
 
Thanks,
 
WILMER
 
 
  • October 18, 2007
  • Like
  • 0