• SFDC_Works
  • NEWBIE
  • 25 Points
  • Member since 2011

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

Situation is something like this.

 

As We know that we can restrict the login hours in Salesforce. Suppose i am restricted from 9am to 5pm.

I now login at 4.30pm and i keep working. what happens at 5.01pm???

 

Please solve it.

Thanks

Can anyone write me a test case for the follwing prog!!!

 

Help needed very urgently.

 

public class opportunityController {
    
    Quotes__c quote;
    Opportunity opportunity;
    Account account;
    Order__c order;
    Invoice__c invoice;
    
    public opportunityController(ApexPages.StandardController controller) {
    }
    
    public Quotes__c getQuote() {
        if(quote == null) quote = new Quotes__c();
        return quote;
    }

    public PageReference saveQuote() {
        getQuote();
        opportunity = [select id,AccountId from Opportunity  where id = :ApexPages.currentPage().getParameters().get('id')];
        account = [select Id,Name,BillingStreet,BillingCity,BillingState,BillingPostalCode,BillingCountry,Phone,ShippingStreet,ShippingCity,ShippingState,
                   ShippingPostalCode,ShippingCountry from Account where id = :Opportunity.AccountId ];
        
        quote.opportunity__c = opportunity.id;
        quote.quoteDate__c = date.today();
        quote.validUntil__c = date.Today() + 15;
        quote.billingCustomer__c = account.Name;
        quote.shipTo__c = account.Name;
        quote.billingStreet__c = account.BillingStreet;
        quote.billingCity__c = account.BillingCity;
        quote.billingState__c = account.BillingState;
        quote.billingCountry__c = account.BillingCountry;
        quote.billingPostalCode__c = account.BillingPostalcode;
        quote.billingPhone__c = account.Phone;
        quote.shippingStreet__c = account.ShippingStreet;
        quote.shippingCity__c = account.ShippingCity;
        quote.shippingState__c = account.ShippingState;
        quote.shippingCountry__c = account.ShippingCountry;
        quote.shippingPostalCode__c = account.ShippingPostalcode;
        quote.shippingPhone__c = account.Phone;
        insert quote;
        OpportunityLineItem[] OLI  = [SELECT Quantity, ListPrice,PricebookEntry.UnitPrice, PricebookEntry.Name,PricebookEntry.Product2.Name
                                        From OpportunityLineItem where OpportunityId = :ApexPages.currentPage().getParameters().get('id') ];
        
        Quote_line_Items__c[] QLT = new Quote_line_Items__c[]{};
                      Quote_line_Items__c items = new Quote_line_Items__c();
                     for(OpportunityLineItem ol: OLI){  
                          items = new Quote_line_Items__c();
                          items.Quote__c = quote.id;
                          items.Quantity__c = ol.Quantity;
                          items.Product__c = ol.PricebookEntry.Product2.Id;        
                          items.Unit_Price__c = ol.PricebookEntry.UnitPrice;
                          items.Total_Price__c = items.Unit_Price__c * items.Quantity__c;
                          QLT.add(items);
                    }
              insert QLT;
        PageReference quotePage = new ApexPages.StandardController(quote).view();
        quotePage.setRedirect(true);
        return quotePage;
    }

}

Hi all....

 

         How can i create a workflow to update a field every 15 days for a set of records.

Ex. i have 1000 records in a custo obejct. Now i want to update a field for all these records every 15 days.

 

please tell me how to achieve this.

 

 

thanks in advance

Hi all...

here is a Brain-storming requirement

I need to have a Auto-Number Field in my ORG  for Opportunity which should work in following ways.

 

The auto number should increment only when a particular account is selected.

 

When i try to create a new Opportunity, i should be able to see the next number that would be generated.
Yes i am using a VFP to Create a new Opportunity.

What can i do to achieve this.

ANy kind of help is appreciated.

 

Thanks

Can anyone write me a test case for the follwing prog!!!

 

Help needed very urgently.

 

public class opportunityController {
    
    Quotes__c quote;
    Opportunity opportunity;
    Account account;
    Order__c order;
    Invoice__c invoice;
    
    public opportunityController(ApexPages.StandardController controller) {
    }
    
    public Quotes__c getQuote() {
        if(quote == null) quote = new Quotes__c();
        return quote;
    }

    public PageReference saveQuote() {
        getQuote();
        opportunity = [select id,AccountId from Opportunity  where id = :ApexPages.currentPage().getParameters().get('id')];
        account = [select Id,Name,BillingStreet,BillingCity,BillingState,BillingPostalCode,BillingCountry,Phone,ShippingStreet,ShippingCity,ShippingState,
                   ShippingPostalCode,ShippingCountry from Account where id = :Opportunity.AccountId ];
        
        quote.opportunity__c = opportunity.id;
        quote.quoteDate__c = date.today();
        quote.validUntil__c = date.Today() + 15;
        quote.billingCustomer__c = account.Name;
        quote.shipTo__c = account.Name;
        quote.billingStreet__c = account.BillingStreet;
        quote.billingCity__c = account.BillingCity;
        quote.billingState__c = account.BillingState;
        quote.billingCountry__c = account.BillingCountry;
        quote.billingPostalCode__c = account.BillingPostalcode;
        quote.billingPhone__c = account.Phone;
        quote.shippingStreet__c = account.ShippingStreet;
        quote.shippingCity__c = account.ShippingCity;
        quote.shippingState__c = account.ShippingState;
        quote.shippingCountry__c = account.ShippingCountry;
        quote.shippingPostalCode__c = account.ShippingPostalcode;
        quote.shippingPhone__c = account.Phone;
        insert quote;
        OpportunityLineItem[] OLI  = [SELECT Quantity, ListPrice,PricebookEntry.UnitPrice, PricebookEntry.Name,PricebookEntry.Product2.Name
                                        From OpportunityLineItem where OpportunityId = :ApexPages.currentPage().getParameters().get('id') ];
        
        Quote_line_Items__c[] QLT = new Quote_line_Items__c[]{};
                      Quote_line_Items__c items = new Quote_line_Items__c();
                     for(OpportunityLineItem ol: OLI){  
                          items = new Quote_line_Items__c();
                          items.Quote__c = quote.id;
                          items.Quantity__c = ol.Quantity;
                          items.Product__c = ol.PricebookEntry.Product2.Id;        
                          items.Unit_Price__c = ol.PricebookEntry.UnitPrice;
                          items.Total_Price__c = items.Unit_Price__c * items.Quantity__c;
                          QLT.add(items);
                    }
              insert QLT;
        PageReference quotePage = new ApexPages.StandardController(quote).view();
        quotePage.setRedirect(true);
        return quotePage;
    }

}

Hi ,

 

How to render a VF page without hyperlinks.....

If using <apex:detail> tag i am rendering a page, it displays all sections...but alongwith [Change],[View Hierarchy] links. Is it possible to remove the links and render the page..

 

Is it possible to render all sections excluding System Information and Custom Links dynamically.

 

Please suggest.

 

Thanks and regards

Vasu

 

 

Hi all,

 

We have a requirement to create an xml file in Apex, and store the file on an external server. Creating an xml file is a no-brainer, but I haven't figured out if it IS possible in Apex(and on Force.com platform) to store the file to a folder on an external server.  I do not wish to create an external webservice(in Java or C#) if possible.

 

Any advice on implementation will be greatly appreciated.

 

Thanks in advance!

 

- A J

Based on a product quantity im displaying product name and price in a datatable. Now at the end of each product list i need a row that should display the sum of the product price. How do i generate this list?

Im using a datatable to display the product name and price. i want to insert  the "total" and "overall total" rows dynamically. please suggest how to do this..

 

Product Name

Total Price

Acer- Liquid Car Charger

7

Acer- Liquid Car Charger

7

Acer- Liquid Car Charger

7

Acer- Liquid Car Charger

7

Acer- Liquid Car Charger

7

Total

35

Acer Neo Touch Leather Case

10

Acer Neo Touch Leather Case

10

Acer Neo Touch Leather Case

10

Acer Neo Touch Leather Case

10

Acer Neo Touch Leather Case

10

total

50

Overall total

85

Does this error mean that the ip address is not whitelisted ? 
 
Thanks,
 
Bill
forceAmp.com