• thylak
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 10
    Replies

i generate the dynamic pdf using wsc. get the account object records from salesforce and generte the dynamic pdf. but  how to get the Date field from salesforce display in  pdf using wsc. i get the Name field that's work fine but Date field not working. how can sovle this problem. pls help me ..............

 

  • March 06, 2012
  • Like
  • 0

i created 2 Picklist  fields in opportunity object. i.e servicetype__c and Tier_Level__c.

     

                ServiceType field contain values i.e  National and International

                TierLevel field contain values i.e  Tier1 and Tier2

i created Price book in Pricebook2 object  after i created multiple products for each price book. 

 

  ex: pricebook  like Tier1,Tier2..................

        Products like  NationalProduct,Internation Product..................

 

Now i fills the Opportunity object.  automatically  Product will be added for that opportunity using trigger. the trigger work like this . fetch the servicetype and tierlevel from opportunity then map in pricebook2 and product2 object after automatically added the product for opportunity this is working fine. Here i am  utilclass and trigger.

 

but Now i need to once Opportunity is updated based selected TierLevel field old product will be removed and new product will be added based on selected value from TierLevel field in Opportuinty object. how can i solve this problem. pls help me.................

 

Trigger

==========

trigger OpportunityProduct on Opportunity (after insert, after update) {  

if(Trigger.isInsert){
       List<OpportunityLineItem> OLI = new List<OpportunityLineItem>();
        Map<String,String> SMap = OpportunityUtils.ServiceMap();
        Map<String,Id> PBookMap = OpportunityUtils.PricebookMap();
        Map<String,Id> PrMap = OpportunityUtils.ProductMap();
        
        String strPCode = '';
        String strPBId = '';
     for(Opportunity o:Trigger.New){
            OpportunityLineItem OLIObj = new OpportunityLineItem();
            strPCode = SMap.get(o.Service_Type__c) +Integer.ValueOf(o.Contract_Length_Months__c);
            strPCode = PrMap.get(strPCode);
            strPBId  = PBookMap.get(o.Tier_Level__c);
            System.debug('strPCode2:'+strPCode+'strPBId:'+strPBId);
            
            List<PriceBookEntry> PBE = [select id, UnitPrice from PriceBookEntry where Product2Id =: strPCode and  Pricebook2Id =: strPBId limit 1];
             if(!PBE.isEmpty()) {
                 OLIObj.PriceBookEntryId = PBE[0].Id;
                 OLIObj.OpportunityId = o.Id;
                 OLIObj.Quantity = 1;
                 OLIObj.TotalPrice = PBE[0].UnitPrice;
                 OLI.add(OLIObj);
                 System.debug('PBE:'+PBE);
             }
         }
         
         if(!OLI.isEmpty()) {
             System.debug('OLI:'+OLI);
             insert OLI;
         }
         
    } //End of Trigger.isInsert
}

 

 

how can i solve this problem. pls help me.................

 

 

  • March 01, 2012
  • Like
  • 0

1. i created record in  Contact .after i created the opportunity for that contact. now automatically contact name field is autopopulated into opportunity object using trigger . how can create the trigger for this task . pls help me...............

  • February 29, 2012
  • Like
  • 0

1. i create the contact. after i created the opportunity for that contact. now i need to autopopulated the contact into opportunity object. using formulas or custom links or workflowrules and trigger . how can i solve this problem .

 

pls help me.................

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • February 28, 2012
  • Like
  • 0

how to autopopulated the contact into opportunity.

 

1. i created one contact record. after i created one opportunity for that contact.

   now i need populate the contact in opportunity. using formulas or custom links or workflow rules and trigger. how can i  solve this problem please help me

 

pls help me................

  • February 27, 2012
  • Like
  • 0

i updated the  contact date field based on opportunity close date field using trigger.

i . i  created contact record after i created 3 opportuinty records for contact. now automatically date field updated in contact .based on opportunity close date. i need get the minimum date from opportunity then update the datefield in contact object. pls help me ...................

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • February 27, 2012
  • Like
  • 0

how can update the contact fields once opportuity added using trigger.

1. i created two fields in Opportunity object i.e Contract Length and Service Date

2. i  created two fields in Contact obejct. i.e Contract Length and Service Date.

 

Now  i fills the value in contaract length and Service Date field in Opportunity object. then automatically  update the Contract Length and Service Date fields in contact object . how can do this task . i am new in apex codeing .pls help me..................

  • February 25, 2012
  • Like
  • 0

i got new requirement from client. i.e Generate the Dynamic PDF .

 

how to get the records from Opportunity object. then Generate the Grid PDF using java  . 

1. First we need to create  a window in side the window create the button. click on this button gets the records from Opportunity object then Generate Grid PDF using java. we need to Edit the PDF also. how can solve this problem .

 

Note: No need Apex class and Visualforce Page.

 

this is urgent Requirement please help me...............................

  • February 15, 2012
  • Like
  • 0

1. i create the contact. after i created the opportunity for that contact. now i need to autopopulated the contact into opportunity object. using formulas or custom links or workflowrules and trigger . how can i solve this problem .

 

pls help me.................

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • February 28, 2012
  • Like
  • 0

i updated the  contact date field based on opportunity close date field using trigger.

i . i  created contact record after i created 3 opportuinty records for contact. now automatically date field updated in contact .based on opportunity close date. i need get the minimum date from opportunity then update the datefield in contact object. pls help me ...................

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • February 27, 2012
  • Like
  • 0

how can update the contact fields once opportuity added using trigger.

1. i created two fields in Opportunity object i.e Contract Length and Service Date

2. i  created two fields in Contact obejct. i.e Contract Length and Service Date.

 

Now  i fills the value in contaract length and Service Date field in Opportunity object. then automatically  update the Contract Length and Service Date fields in contact object . how can do this task . i am new in apex codeing .pls help me..................

  • February 25, 2012
  • Like
  • 0