• vab
  • NEWBIE
  • 0 Points
  • Member since 2009

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

HI everybody,

 

i need to build a functionality where i need to import bulk opportunity through UI into salesforce from excel or csv file.

 

I want to build this functionality through Visualforce page, but i am not able to find a solution for this.

 

Can anybody please help me how can i achieve this functionality?

  • May 27, 2009
  • Like
  • 0

Hi,

 

I have a custom object , which includes three custom fields (Start date, End Date and Business Unit(Type: Picklist).

The three custom fields should be unique for a record, so the combination of these fields makes my record unique.

 

 

 

Example: start date: 05/20/2011, End Date: 05/27/2011, Business Type: Devices

                  Start date: 05/20/2011, End date:05/27/2011, Business Type: Drugs

 

Also, we must make sure that for new record the start and end dates do not fall within the above mentioned dates.

So the next acceptable record is:

 

Start date: 05/28/2011, end date: 05/31/2011,business type:Devices.

 

Note: I have a validation rule that checks that end date is always after start date.

 

I am having a road block to get this logic right in my trigger . Any help/pseudo code on this is highly appreciated.

 

Thanks,

Sales4ce

 

Hi Everyone,

 

I have wriiten below trigger to add weekdates to custom object. However I am getting the below error while executing the code. Can anyone help me out to resolve this issue.

 

trigger AddWeekends on Calendar__c (after insert) {
            List<Calendar__c> lstcal = new List<Calendar__c>();
            List<Calendar__c> lstcal1 = new List<Calendar__c>();
            Date orig = Date.today();
            system.debug('++++'+orig);
            Date satDate = Date.Parse('01/01/2011');
            Date sunDate = Date.Parse('01/02/2011');
            integer i;
           // Adding all Saturdays

            For(i=0; i<52; i++){
            Calendar__c cal = new Calendar__c();
            cal.Date__c = SatDate;
            cal.Holidays__c = 1;
            Cal.Description__c = 'Weekend';
            system.debug('#####'+SatDate);
            upsert Cal;
            satDate += 7;
        }

          // Adding all Sundays
            For(i=0; i<52; i++){
            Calendar__c cal1 = new Calendar__c();
            cal1.Date__c = SunDate;
            cal1.Holidays__c =2;
            Cal1.Description__c = 'Weekend';
            system.debug('$$$$$'+SunDate);
            upsert Cal1;
            sunDate += 7;
        }                   
}

 

Error Message:  Apex trigger AddWeekends caused an unexpected exception, contact your administrator: AddWeekends: execution of AfterInsert caused by: System.DmlException: Upsert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AddWeekends: maximum trigger depth exceeded Calendar trigger event AfterInsert for [a0O50000002GU5Q] Calendar trigger event AfterInsert for [a0O50000002GU5R] Calendar trigger event AfterInsert for [a0O50000002GU5S] Calendar trigger event AfterInsert for [a0O50000002GU5T] Calendar trigger event AfterInsert for [a0O50000002GU5U] Calendar trigger event AfterInsert for [a0O50000002GU5V] Calendar trigger event AfterInsert for [a0O50000002GU5W] Calendar trigger event AfterInsert for [a0O50000002GU5X] Calendar trigger event AfterInsert for [a0O50000002GU5Y] Calendar trigger event AfterInsert for [a0O50000002GU5Z] Calendar trigger event AfterInsert for [a0O50000002GU5a] Calendar trigger event AfterInsert for [a0O50000002GU5b] Calendar trigger event AfterInsert for [a0O50000002GU5c] Calendar trigger event AfterInsert for [a0O50000002GU5d] Calendar trigger event AfterInsert for [a0O50000002GU5e] Calendar trigger event AfterInsert for [a0O50000002GU5f]: []: Trigger.AddWeekends: line 15, column 13

 

Any help is appreciated...

 

 

Are the Object Translation files necessary?  I have several that have incorrect picklist values and are failing when I am deploying to production.

Hi,

Currently I'm planning a migration into Salesforce, including partner portal. Averything around the portal setup is clear and I can create new portal user manually.

 

In preparation for the big data load where I will need to activate a few hundred partner (and activate a few hundred users in a 2nd step), I facing the problem that nobody wants to do this manually ;-)

 

Since I don't want to do this by hand as well, I'd like to automate the mechanism on the account: "Work with portal" --> "enable Partner"

 

This action calls the following link: 

 

https://cs3.salesforce.com/ui/prm/PRMAccountPage/e?save=1&retURL=<SF-ID>&id=<SF-ID>

 

I tried to bypass this by using the dataloader (update the field IsPartner=true), but this is not good enough...

 

Any tips appreciated

Julius

Message Edited by JuliusG on 03-17-2010 10:37 AM

Hi,

 

I am trying to create an applet which can be used to upload files using drag/drop. Its working perfectly fine on my local machine but when uploaded to static resources, it doesnt works.

 

I have signed all the jar files including the axis files. While uploading a file it shows an error message:

 

 

network: Cache entry not found [url: https://c.ap1.visual.force.com/apex/, version: null]Exception in thread "Thread-12" java.lang.NoClassDefFoundError: IllegalName: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> at java.lang.ClassLoader.preDefineClass(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:530) at java.security.AccessController.doPrivileged(Native Method) at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:517) at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:288) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370) at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:37) at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43) at org.apache.axis.client.Service.getAxisClient(Service.java:104) at org.apache.axis.client.Service.<init>(Service.java:113) at com.sforce.soap.partner.SforceServiceLocator.<init>(SforceServiceLocator.java:16) at SalesforceAgent.login(SalesforceAgent.java:115) at DNDApplet$2.run(DNDApplet.java:477) at java.lang.Thread.run(Unknown Source)

 Any idea, why this is coming and how can i resolve this. Please advise.

/Gulshan 

 

  • January 14, 2010
  • Like
  • 0

Hi All,

 

I am trying to query 10000 records and using a for loop o fetch them all. I know we can get these records in a list but can we get them in a map?

 

When i try :

 

 

for(Map<Id,Account> aMap : new Map<Id,Account>([Select Id,Name from Account])){}

 

 I am getting this error: Loop must iterate over a collection type: MAP:Id,SOBJECT:Account
 
Please advise. 

 

  • October 19, 2009
  • Like
  • 0

How to  open a java applet from a  visual force page.

 

Please share me the script and code of visual force.

 

Any help will be appriciated.

 

Thanks...

  • January 30, 2009
  • Like
  • 0
I have a Custom Button on my SObject, it is a List Button that points to a S-Control.  I have built a new Visual Force Page to replace it.  However, there is no option to select.
 
In the Page "Custom Button or Link Edit", the display type is a radio button with three options:
 
Detail Page Link
Detail Page Button
List Button
 
If you select List button, there is a Drop Down list for Content Source, the available options are:
 
URL
Custom S-Control
OnClick JavaScript.
 
 
There is no option for a Visual Force Page.  How can I utilize my VF page?
 
Thanks,
Steve
 
hi friends,
1)I am writing Apex classes for parsing the content of the csv file . But at the time of execution I am getting this error
System Exception : Too many Script Statements
As csv contains more than 254 fields and around 200 rows . I think I am getting this Exception . So can u pls help on this .
 
2)Even this exception is not caught by try ang catch block . Is there any way to catch this exception if it generates while execution . pls suggest any solutions if you have.