• Preetham 345 SFDC
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 8
    Replies
Hi All,
Can any help me in providing a apex sample code for how to insert a more than one attachment for a single opportunity with the help of apex by reading the location of the attachment file from my local .

Thanks in Advance
Preetham 354 SFDC
Hi All, 
Can we load more than 3 same attachments for 100 Opportunities at a time using apex , if possible can any one provide a sample apex code for this requirement , the main issue in which i am facing is with  parent Id since it is a mandatory field to insert an attachment , without inserting an attachment how would i relate it to that parent id or if i go in vice versa  after inserting the 100 Opportunities how should  i related the  3 attacments attachments to those 100 opportunities so when insertion of those  attachments  shouldnt create duplicates on attchement objects.

Thansk 
Preetham 345 SFDC  
Can any one help me in suggesting the way to Backup the Existing Data  and apex code and visualforce pages in Salesforce production before any enhancements  or reinstallation of a perticular new  application takes place (i.e before deploying any changes from Sandbox) .For example if we take a full sandbox when we refresh it from production , full sandbox will be updated with all the data which is there in existing prodution till that date of refreh . Can we do similar refresh of Salesforce production like that and put a backup of that original production data.

Thanks 
Preetham345 SFDC 
 
Hi All ,
Say the are two picklists A and B and two visual force pages 1 and 2 . Page 1 consists of Next button and page two consists of Back button 
I was trying to enable a picklist B on page1  when i click on back command button on  page2 using javascript. But the picklistB in which i am trying to enable is enabled or  disabled based on the other picklistA values in the page 1 itself. So when i was trying to move forward from page 1 to 2 i am able to succeed , but when i am trying to move backward the picklist B value is getting locked (disabled) which should not happen .
Could any one  possibly help me with how to handle with your valuable suggestions .  

Thanks 
Preetham SFDC 

 
Hello Every One,
I am trying to implement a bulk upload process for my client  by uploading a  csv file and Database.Insert class at the backend on the controller side.At the front end in the UI i am showing the user a visual Force page of data tabel(reading the data) which consits of data in csv file. Now I succeded till  insertion of all the records into saleforce which in csv file. Now i am in a plan to implement a 'Progress Bar' or 'Status Bar' which will pop up when user will click on Insert button and will update its status as per records get inserted(simillarly like status bar in data loader). If any one had worked on this kind of scenario , Could you please provide me a link or sample code so that would be easy for me  to implement it.

Thanks in Advance    
Hi All,
Hope everyone is doing great, I have a scenario where  i have to read csv file with multiple objects fields(Accounts,Opportunities,Opportunities Line Items, One Custom Object) in it from apex class and populate them on Visual Force Page using pageblockTable, and has to only insert those populated records into backend, but i have to do this insert operation  based on  custom batch only . I am unable to figure out how to acheive the insert operation for custom batch and how to relate it Job . If any one face this kind of situation  could you please suggest me how to proceed by providing possible solution to it.

Thanks in advance  
I am getting this error  in the ApexTrigger in the production environment , And i am also pasting the query  where i am  getting this error 

Map<ID, Contact> contactsForAccounts = new Map<ID, Contact>([select Id
                                                            ,AccountId
                                                            from Contact
                                                             where AccountId in :acctIds and Name != null and Contact_Type__c includes ('Technical Contact')]);

ApexTrigger: execution of AfterUpdate  caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
Even if a field is indexed a filter might still not be selective when:
1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)

I have searched so many blogs in google , what ever they suggested in that blog are there in this query , eventhough i dont know why i am getting this error.
If any one have any idea on this , please Kindly help me over this error.


Hello Hi , 
I am a new to salesforce , Can any one please tell me why cant we execute Select * from .....  qurey in  SOQL editor. Is that not used in salesforce
And I have aquery which i have to execute in SOQL  which written in  general SQL. Could any one  help me on this .
The query should check for any column that have 10 or less entries. I don't know sosl/soql but if I were to write this in oracle sql it would look like below.

select * from <object/table> where <column/field> is not null and count (<column/field>) <= 10;

I think that would work and normally I would test it against a DB before sending out. It would just need to be run against all objects and each field.
Hi All,

Am facing this issue on step 5 , can any one help me complete this challenge.

User-added image
Can any one help me in suggesting the way to Backup the Existing Data  and apex code and visualforce pages in Salesforce production before any enhancements  or reinstallation of a perticular new  application takes place (i.e before deploying any changes from Sandbox) .For example if we take a full sandbox when we refresh it from production , full sandbox will be updated with all the data which is there in existing prodution till that date of refreh . Can we do similar refresh of Salesforce production like that and put a backup of that original production data.

Thanks 
Preetham345 SFDC 
 
Hello Every One,
I am trying to implement a bulk upload process for my client  by uploading a  csv file and Database.Insert class at the backend on the controller side.At the front end in the UI i am showing the user a visual Force page of data tabel(reading the data) which consits of data in csv file. Now I succeded till  insertion of all the records into saleforce which in csv file. Now i am in a plan to implement a 'Progress Bar' or 'Status Bar' which will pop up when user will click on Insert button and will update its status as per records get inserted(simillarly like status bar in data loader). If any one had worked on this kind of scenario , Could you please provide me a link or sample code so that would be easy for me  to implement it.

Thanks in Advance    
Hi All,
Hope everyone is doing great, I have a scenario where  i have to read csv file with multiple objects fields(Accounts,Opportunities,Opportunities Line Items, One Custom Object) in it from apex class and populate them on Visual Force Page using pageblockTable, and has to only insert those populated records into backend, but i have to do this insert operation  based on  custom batch only . I am unable to figure out how to acheive the insert operation for custom batch and how to relate it Job . If any one face this kind of situation  could you please suggest me how to proceed by providing possible solution to it.

Thanks in advance  
I am getting this error  in the ApexTrigger in the production environment , And i am also pasting the query  where i am  getting this error 

Map<ID, Contact> contactsForAccounts = new Map<ID, Contact>([select Id
                                                            ,AccountId
                                                            from Contact
                                                             where AccountId in :acctIds and Name != null and Contact_Type__c includes ('Technical Contact')]);

ApexTrigger: execution of AfterUpdate  caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
Even if a field is indexed a filter might still not be selective when:
1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)

I have searched so many blogs in google , what ever they suggested in that blog are there in this query , eventhough i dont know why i am getting this error.
If any one have any idea on this , please Kindly help me over this error.


Hello Hi , 
I am a new to salesforce , Can any one please tell me why cant we execute Select * from .....  qurey in  SOQL editor. Is that not used in salesforce
And I have aquery which i have to execute in SOQL  which written in  general SQL. Could any one  help me on this .
The query should check for any column that have 10 or less entries. I don't know sosl/soql but if I were to write this in oracle sql it would look like below.

select * from <object/table> where <column/field> is not null and count (<column/field>) <= 10;

I think that would work and normally I would test it against a DB before sending out. It would just need to be run against all objects and each field.