• nitesh gadkari
  • NEWBIE
  • 293 Points
  • Member since 2014
  • Certified Salesforce Developer
  • Compro Technologies


  • Chatter
    Feed
  • 9
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 116
    Replies
Hello Evryone,
I am trying to render two sections based on two checkbox values. If Export is TRUE then show Sample1 and in Import is TRUE then show Sample 2.

VF Page:
<apex:page standardcontroller="Opportunity" tabStyle="Opportunity" extensions="OppExt">
  <apex:form >
      <apex:pageBlock title="Opportunity Edit">
       <apex:pageBlockButtons >
        <apex:commandButton action="{!getcontinue}" value="continue"/>
        <apex:commandButton action="{!Cancel}" value="Cancel"/>
       </apex:pageBlockButtons>
       
       <apex:pageBlockSection id="block" title="Service Type Field Information" columns="2" >
             <apex:inputField value="{!Opportunity.Export_ck__c}">
                  <apex:actionsupport event="onclick" rerender="Sample1" status="AjaxStatus1"/>
             </apex:inputField>
             <apex:inputField value="{!Opportunity.Import_ck__c}">
                  <apex:actionsupport event="onclick" rerender="Sample2" status="AjaxStatus2"/>
             </apex:inputField>
         
       </apex:pageBlockSection> 
 
       <apex:pageBlockSection title="Opportunity Information" columns="2">
            <apex:outputField title="Opportunity Owner" value="{!Opportunity.OwnerId}"/>
            <apex:inputField required="true" value="{!Opportunity.Type}"/>
            <apex:inputField value="{!Opportunity.Name}"/>
            <apex:inputField value="{!Opportunity.LeadSource}"/>
            <apex:inputField value="{!Opportunity.AccountId}"/>
            <apex:inputField value="{!Opportunity.CloseDate}"/>
            <apex:inputField required="true" value="{!Opportunity.Priority__c}"/>
            <apex:inputField required="true" value="{!Opportunity.Lead_Source_Details_del__c}"/>
            <apex:inputField value="{!Opportunity.Contact__c}"/>
            <apex:inputField value="{!Opportunity.Mobile__c}"/>
        </apex:pageBlockSection>
        
        <apex:outputpanel id="Sample1">
        <apex:actionStatus id="AjaxStatus1">
               <apex:facet name="stop"> 
                 <apex:pageBlockSection title="Additional Information" columns="2" rendered="{!IF(Opportunity.Export_ck__c == true, true, false)}">
                    <apex:inputField required="true" value="{!Opportunity.NextStep}"/>
                    <apex:inputField required="true" value="{!Opportunity.Description}" />
                    <apex:inputField required="true" value="{!Opportunity.Followup_DateTime__c}"/>
                 </apex:pageBlockSection> 
               </apex:facet> 
        </apex:actionStatus> 
        </apex:outputpanel>  
        
        <apex:outputpanel id="Sample2">
        <apex:actionStatus id="AjaxStatus2">
              <apex:facet name="stop">
                <apex:pageBlockSection title="Other Information" columns="2" rendered="{!IF(Opportunity.Import_ck__c == true, true, false)}">
                    <apex:inputField required="false" value="{!Opportunity.Probability}" />
                    <apex:inputField value="{!Opportunity.Test_Month_Closed_Today_s_Month__c}"/>
                </apex:pageBlockSection> 
              </apex:facet>
        </apex:actionStatus> 
        </apex:outputpanel> 
         
      </apex:pageBlock>
  </apex:form>
</apex:page>

Controller:
public with sharing class OppExt {

    Public Opportunity opp {get;set;}
    
    Public Boolean Export_ck {get;set;}
    Public Boolean Import_ck {get;set;}
    
    Private ApexPages.StandardController sController;
    
    public OppExt(ApexPages.StandardController controller) 
    {
        this.opp=(Opportunity)Controller.getRecord();
        sController=controller;
        
    }
    Id DomesticRecordTypeId = Schema.SObjectType.Opportunity.getRecordTypeInfosByName().get('Domestic').getRecordTypeId();
    public PageReference getcontinue()
    {
    
      sController.save();
      
     PageReference pr = new PageReference('/006/e?retURL=%2F006%2Fo&RecordType='+DomesticRecordTypeId+'&ent=Opportunity');  
     pr.setRedirect(true);
     return pr;
    }

}


  • October 15, 2014
  • Like
  • 0
Can some one suggest any website in which there are some sample  code of apex with screen shots except infallible and shiva websites.Tha
Hi,

How to run the sheduler class to execute anonymous?


Thank's.....
Hello VF Devp,
               I want to make my page more attractive...........and easy way to make validations(any)..... please give me any example with code explanation...........
if you specifying static resources then please specify from where can i get resurces and specify dynamic resources................


Thank's in Advance
Hello,

I have what I think is a unique request from the executive management at my organization. They wanted me to build in a sales history displaying a specific account sales history Month to Date as well as display Last Year Month to Date.

This is not a problem and I created the individual fields for the historical sales information and it displays well.

What I woud like to do is create a Visual Force page that will display Month to Date Sales and the directly below I want to display the field that contains Last Year Sales Month to Date so the account managers can see the target or how they did with that account the year previous.

Is there some kind of formula that I can write that says if between April 1 to April 30 display Field April 2013, May 1 to May 30 display May 2013?

This is my current code... it is just  a quick mock up very basic display of blocktables... nothing special.

Any input would be great thanks

<apex:page standardController="Account">
<b>Account Name:{!account.name}</b>
    <apex:pageBlock >
        <apex:pageBlockTable value="{!account}" var="ac">
            <apex:column Value="{!ac.LY_Annual_Sales__c}"/>
            <apex:column value="{!ac.GP__c}"/>        
        </apex:pageBlockTable>
        <apex:pageBlockTable value="{!account}" var="ac">
            <apex:column Value="{!ac.LY_Annual_Sales__c}"/>
            <apex:column value="{!ac.GP__c}"/>        
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>
How good are the job opportunities for Salesforce administrator. How good will be the career if choose the admin side and try to move towards consulting?

Any suggestions..
Hi clever people,

does anyone know if its possible to "Re-point" a roll up field to another object? we have some rollups that summerise a certain object and i want to edit the rollup to summerise a different object. Basically so i dont have to change a load of reports to use any new fields.

Thanks

Can anyone tell me the working process for sales objects in salesforce
Thanks in advance
Karthick
Hi Everyone,

I have a query related to REST API url. 

I have exposed a REST API via Force.com sites, which will create record once the API is hit. I want to pass all parameters in URL. But, doing this i encounter following error:

[{"errorCode":"UNSUPPORTED_MEDIA_TYPE","message":"Content-Type header specified in HTTP request is not supported: application/x-www-form-urlencoded"}]

To resolve this how can i pass the required content type value in url or what's the alternate way to resolve this.


Regards
Nitesh

 
Hi all,

I have a requirement to indentify number of emails sent by each user (basically related to cases) for service cloud.I have pulled a report for the same which does not exactly gives the count.For instance,when the cases are assigned to specific owners, and some one else has sent email on a particular case,the email count against case owner ,but not against the sender of the email.

​Thanks!! 
Hi Everyone,
I am unable to login to employee community.Can any one help me out what i might be missing?
When i am looking into the user's login history i am getting login type="Chatter Communities External User" and  status="No community access"

Thanks
Nitesh
Hi all,

I have a requirement to indentify number of emails sent by each user (basically related to cases) for service cloud.I have pulled a report for the same which does not exactly gives the count.For instance,when the cases are assigned to specific owners, and some one else has sent email on a particular case,the email count against case owner ,but not against the sender of the email.

​Thanks!! 
I am not getting any error  on opportunity object and created task,but the same code is not working on contact
it giving error like this
exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Related To ID: id value of incorrect type: 0032800000NuHm0AAF: [WhatId]: T
Thanks in advance ,  Please give me solution for this 
trgger autocreatetask on Contact (after  insert , after update)  {
  
    list<task> tasklist = new list<task>();    
        for(contact con : trigger.new){
          task t = new task();
          t.whatid=con.id;
          t.Status = 'In Progress';
          t.Subject='call';
          t.Priority = 'High';
          t.ownerid= con.ownerid;

            tasklist.add(t);
        }
        
        insert tasklist ;     
    
    }
Hi, 
  Please tell me how to generate auto generated number to display in VF Page using apex code.

Thanks in advance
  • April 21, 2016
  • Like
  • 0
Hi All

Maybe this problem is being faced only by me

I have a visualforce page opening on a publisher action in Salesforce1
This page is being used both in Desktop and SF1 (IPAD/Android)

The page is having a lookup to contact object --> When clicked it navigates to lookup window, but then on searching records, it does not allow me to select any record

I just keep tapping on the record and it does not take me to the previous screen

Can anyone please help me on this ?

Many thanks in advance!
public class FindunpaidInvoices {
    private final List<Invoice_Consulting__c> invoices;

    public FindunpaidInvoices() {
        invoices = [select Account__c, Invoice_Date__c, Balance_Due__c from Invoice_Consulting__c where Name = 'Unpaid'];
    }

    public List<Invoice_Consulting__c> getUnpaidInvoices() {
        return invoices;
    }
}
Hallo Everyone,

Few months ago I had an problem. After Insalling Salesforce for Outlook (I think it was version 2.6.1) it refused to work, becouse "you are not connected to Microsoft Exchange server". So I still have to work with an old version of SfOutlook.
I wanted to know if the 2.6.2 solved this problem and clients without Microsoft Exchenge server can uptade and use it? Or ist there some othere solution for this?

Greetings from Berlin
Pawel M.
how many records we will display in single visualforcepage.by using standard controller and  custom controller.



Thanks to advance
Reference: Closed Case #11065574.
Unable to repost/clone case question in support. :/

Hello,
 
Let me first state, I am not a developer, but am filling in for my organization because our developer has her hands full and cannot make time for this project. So, if you could kindly respond with steps, videos, or tutorials that would make sense to a 10 year old using this program, that would be helpful.
 
I am trying to create a custom field that has custom tracking.
 
On my Contact Layout Page, I have a history tracking field that is titled "Customer History". This related list tracks all changes to standard fields indicated as well as few custom fields.
 
I would like to create an ENTIRELY SEPARATE related list for tracking titled "OCN Contact History". This tracking would act the same as the "Customer History" tracking above, but ONLY TRACK ONE custom created field - "OCN Contact".
 
Essentially, we recently started using OCN - One Call Now to manage our outgoing phone calls. Ideally, I would like to be able to simply import the Excel Spreadsheet that we sent to OCN to make the calls, into SF to update all customer accounts affected. But our developer has told us this is a tedious process.
 
So, as a workaround, if we create this custom short text field, with a separate tracking area for changes, we should be able to update accounts in 3 seconds or less.
 
Example:
 
OCN Contact: Call. SAVE.
 
The custom OCN CONTACT HISTORY panel would then display:
 
Date/Time Stamp          User                             Action
10/2/2014 9:42am        Nature's Select           Changed OCN Contact to Call.
 
We could then, at a glance, view all OCN contacts made on a customer record at a glance, without digging through pages of general Customer History to find what we need.
 
So, I need to know:
 
How to create a custom related list (is that the correct term for the OCN CONTACT HISTORY area I would like)?
 
How to create a custom field (OCN CONTACT), with history  tracking, set to only record its edited records in the custom list  OCN CONTACT HISTORY.
 
Thanks for all your help!
 
Hello All,

I have below few questions on Salesforce1 Lightning. Can any one help me here with answers.
1) What are major advantages and disadvantages of  Salesforce1 Lightning?
2) Is  Lightning Schema Builder different than existing Schema Builder? If, YES then 
     2.1) What are the advantages of Lightning Schema Builder over existing Schema Builder? 
     2.2) How to access Lightning Schema Builder?
3) What are the advantages of  Lightning Process Builder over existing Visual Workflow?

Thanks!!
 
Can anyone please help me understand why this is hitting SOQL limits?  I repurposed a previously working trigger that I had to do pretty much the same thing again but with a little bit more if then statements and a couple oldmap.get statements.  The prior trigger would allow you to import opportunities and update a date field and that would make the trigger go off with no problems.  But now this one doing pretty much the same thing with a checkbox is hitting SOQL statements when I try to do the import update to a special checkbox field.  Any ideas?

Thanks so much,
Amanda

trigger CloneOpportunityRollover on Opportunity (after Update) {
    
    List <Opportunity> opportunities = [select Id, Name, Type, LeadSource, Roll_Manually__c, Textbook__c, Description, Subject__c, Term_Use__c, Opportunity_Rolled__c,
    Opportunity_Rolled_From__c, AccountID, StageName, Term__c, CloseDate, Account.Academic_Calendar__c, Account.Winter_Course_Start_Date__c, Opportunity_Type__c,
    Account.Spring_Course_Start_Date__c, Account.Summer_Course_Start_Date__c, Account.Fall_Course_Start_Date__c, (select Id, opportunity.term__c,
    opportunity.stagename, opportunity.Term_Use__c, opportunity.account.Academic_Calendar__c,unitprice, Quantity, PricebookEntryID, Description From
    OpportunityLineItems), (Select Id, Contactid, IsPrimary, Role From OpportunityContactRoles) from Opportunity where ID IN :Trigger.newMap.keySet()];
    
    
    List<Opportunity> opportunitiesToUpdate = new List<Opportunity>{};
    List<Opportunity> newOpportunities = new List<Opportunity>{};
    List<OpportunityLineItem> newOpportunityLineitems = new List<OpportunityLineItem>{};
    List<opportunitycontactrole> newOpportunityContactRoles = new List<opportunitycontactrole>{};
    Integer CurrentYear = Date.Today().Year();
    
    
    

    for(Opportunity opp : opportunities){
    Integer CloseDateMonth = Opp.CloseDate.Month();
        if (((trigger.oldMap.get(Opp.id).StageName != null && opp.StageName == 'Commitment' &&  opp.Stagename != trigger.oldMap.get(Opp.id).StageName)  || opp.Roll_Manually__c == True) && Opp.Opportunity_Rolled__c == False && (Opp.Opportunity_Type__c == 'Hayden-McNeil' ||
        Opp.Opportunity_Type__c == 'Sapling Learning' || Opp.Opportunity_Type__c == 'Late Nite Labs' || Opp.Opportunity_Type__c == 'Nature Ed' ||
        Opp.Opportunity_Type__c == 'i>clicker')) {
            Opportunity newOpp;
            
            
//          try {
            
                newOpp = opp.clone(false);
                if (Opp.Term_Use__c == 'Used Each Term') {
                                
                    if (opp.term__c == 'Fall' && opp.account.Academic_Calendar__c == 'Semester') {
                        newOpp.Term__c = 'Spring';
                        if (opp.account.Spring_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Spring_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 1, 1) ;}
                    } else if (opp.term__c == 'Winter' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester')) {
                        newOpp.Term__c = 'Spring';
                        if (opp.account.Spring_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Spring_Course_Start_Date__c;
                        } else if (opp.closedate.month()==1 || opp.closedate.month()==2){
                        newOpp.CloseDate = date.newInstance(opp.CloseDate.Year(), 3, 1) ;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 3, 1) ;}
                    } else if ( opp.term__c == 'Spring' && opp.account.Academic_Calendar__c == 'Semester' )  {
                        newOpp.Term__c = 'Fall';
                        if (opp.account.Fall_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Fall_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year(), 9, 1) ;}
                    } else if ( opp.term__c == 'Fall' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester'))  {
                        newOpp.Term__c = 'Winter';
                        if (opp.account.Winter_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Winter_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 1, 1);}
                    } else if ( opp.term__c == 'Spring' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester'))  {
                        newOpp.Term__c = 'Summer';
                        if (opp.account.Summer_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Summer_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year(), 5, 1);}
                    } else if (opp.term__c == 'Summer') {
                        newOpp.Term__c = 'Summer';
                        if (opp.account.Summer_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Summer_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 5, 1) ;}
                    }
                } else if (Opp.Term_Use__c == 'Single Term') {
                                
                    if ( opp.term__c == 'Spring' && opp.account.Academic_Calendar__c == 'Semester') {
                        newOpp.Term__c = 'Spring';
                        if (opp.account.Spring_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Spring_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 1, 1);}
                    } else if (opp.term__c == 'Fall' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester'))  {
                        newOpp.Term__c = 'Spring';
                        if (opp.account.Spring_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Spring_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 3, 1);}
                    } else if (opp.term__c == 'Fall' && opp.account.Academic_Calendar__c == 'Semester')  {
                        newOpp.Term__c = 'Fall';
                        if (opp.account.Fall_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Fall_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 9, 1);}
                    } else if (opp.term__c == 'Spring' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester'))  {
                        newOpp.Term__c = 'Fall';
                        if (opp.account.Fall_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Fall_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year(), 9, 1);}
                    } else if ( opp.term__c == 'Summer' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester'))  {
                        newOpp.Term__c = 'Summer';
                        if (opp.account.Summer_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Summer_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 5, 1);}
                    } else if (( opp.term__c == 'Winter' && (opp.account.Academic_Calendar__c == 'Quarter' || opp.account.Academic_Calendar__c == 'Trimester')) || ( opp.term__c == 'Fall' && opp.account.Academic_Calendar__c == 'Trimester'))  {
                        newOpp.Term__c = 'Summer';
                        if (opp.account.Summer_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Summer_Course_Start_Date__c;
                        } else if (opp.closedate.month()==1 || opp.closedate.month()==2){
                        newOpp.CloseDate = date.newInstance(opp.CloseDate.Year(), 5, 1) ;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 5, 1) ;}
                    } else if (opp.term__c == 'Summer' && opp.account.Academic_Calendar__c == 'Semester') {
                        newOpp.Term__c = 'Summer';
                        if (opp.account.Summer_Course_Start_Date__c > opp.closedate){
                        newOpp.CloseDate = opp.account.Summer_Course_Start_Date__c;
                        } else {newopp.CloseDate = date.newInstance(opp.CloseDate.Year()+1, 5, 1) ;}
                    }
               }
                newOpp.Type = 'Renewal';
                newOpp.Name = opp.Name;
                newOpp.StageName = 'In Closing';
                newOpp.Roll_Manually__c = False;
                newOpp.Opportunity_Rolled__c = False;
                newOpp.Opportunity_Rolled_From__c = opp.ID;
                newOpportunities.add(newOpp);
                opp.Opportunity_Rolled__c = True;
                opportunitiesToUpdate.add(opp);
                
//          } catch (Exception e){
//              //ApexPages.addMessages(e);
//              opportunitiesToUpdate = new List<Opportunity>{};
//              newOpportunities = new List<Opportunity>{};
//              newOpportunityLineitems = new List<OpportunityLineItem>{};
//              newOpportunityContactRoles = new List<opportunitycontactrole>{};
//          }
    }}
    
    // setup the save point for rollback
    Savepoint sp = Database.setSavepoint();

//  try {
    
        insert newOpportunities;
        update opportunitiesToUpdate;
        
        Integer size = newOpportunities.size();
        
        for(Integer i = 0; i < size; i++){
            
            Opportunity opp = opportunitiesToUpdate.get(i);
            Opportunity newOpp = newOpportunities.get(i);
            
            List<OpportunityLineItem> lineItems = opp.OpportunityLineItems;
            //System.debug(lineItems.size=' + 'lineItems.size());
            for (OpportunityLineItem oli : lineItems) {
                 OpportunityLineItem newoli = oli.clone(false);
                 Decimal rounddown = oli.quantity *.8;
                    Decimal roundeddown = Rounddown.setScale(0, RoundingMode.DOWN);
                    system.debug(roundeddown);
                 Decimal roundup = oli.quantity *1.2;
                    Decimal roundedup = Roundup.setScale(0, RoundingMode.UP);
                    system.debug(roundedup);
                                                 
                    if ( oli.opportunity.term__c == 'Fall' && oli.opportunity.account.Academic_Calendar__c == 'Semester' && oli.opportunity.Term_Use__c=='Used Each Term'  ) {
                        newOli.Quantity = roundeddown;
                    } else if ( oli.opportunity.term__c == 'Spring' && oli.opportunity.account.Academic_Calendar__c == 'Semester' && oli.opportunity.Term_Use__c=='Used Each Term') {
                        newOli.Quantity = roundedup;
                    }
                 newoli.OpportunityID = newOpp.id;
                 newOpportunityLineitems.add(newoli);
            }
            
            List<opportunitycontactrole> roles = opp.opportunitycontactroles;
            //System.debug("roles.size=" + roles.size());
            for (opportunitycontactrole ocr : roles) {
                 opportunitycontactrole newocr = ocr.clone(false);
                 newocr.Opportunityid = newOpp.id;
                 newOpportunityContactRoles.add(newocr);
            }
        }

        
        insert newOpportunityLineitems;
        insert newopportunitycontactroles;


//  } catch (Exception e){
//      // roll everything back in case of error
//      Database.rollback(sp);
//      //ApexPages.addMessages(e);
//  }
}
hi all,

i am creating an VF email template wherein i am sending an attachment in pdf format.However the styling that i am applying through css is not working.
can anyone help me?below is my code

<messaging:emailTemplate subject="{!relatedTo.Business_Partner__c}confirm next visit date please" 
                         recipientType="User"
                         relatedToType="Order__c">
                       
<messaging:htmlEmailBody >
    <html>
    <head>
    <style>
    table,td,th{border-style: groove;  border-collapse: collapse;}
    </style>
    </head>
        <body>
        <center><apex:image value="{!$Resource.MaxxiumHeader}" alt="header"/></center>
        <p>Dear {!relatedTo.Contact_Person__r.name},</p>
        <p>I would like to confirm our Product Order detail</p>
        
        <table>
        <tr>
           <th>Product Name</th>
           <th>Product Brand</th>
           <th>Product Category</th>
           <th>Net Price</th>
        </tr>
      
        </table>
        <p>Thank you for your confirmation.</p>
        <p>Kind Regards,</p>
      
        </body>
    </html>
</messaging:htmlEmailBody>
 
<messaging:attachment renderAs="PDF">

<head>
<style type="text/CSS">
 .colorStyle
 {
     background-color=#A0A0A0;
 }
</style>
</head>
<body>
 <div>
  <apex:outputText styleClass="colorStyle">Wholesaler Information         </apex:outputText>
   <apex:repeat value="{!relatedTo.Wholesaler__r}" var="acc">
    <tr><td>Name</td><td>{!acc.name}</td></tr>
    <tr><td>Fax</td><td>{!acc.Fax}</td></tr>    
  </apex:repeat>
 </div>

  </body>

</messaging:attachment>
</messaging:emailTemplate>


When will the winter '15 api options be made fully available for development use. Just to clarify, the specific API portions I am looking to integrate with involve the content delivery fields "Content Distribution".
I get this mesage in my developer edition when i login please fix this issue and advice what can be done

Hi,

We have a requirement to provide a search option to salesforce.com communities which actually performs search within communities as well as invoke an external web service to get the results from the customer websites. We have a requirement to display both the search results in a single page (we can show as 2 separate block). 

We have tried below 2 options and faces 2 different problems 
1. Provide a custom search - we can call a method which in turn call the Web Service as well as use SOSL to get the result list from different SFDC objects. But we are unable to provide a hyperlink to the search results returned from SOSL queries, so that record detail page can be open.
2. Enable global search in communities - obviously we can not call web service from the global search 

any thoughts on this will be highly appreciated. 

Regards,
Sourav

 

I need to export attachment objects from salesforce. it contains binary fields .

Dataloader says on export cannot export binary fields..any suggestion ?
Hi
I am getting following error when i am trying to create custom object
System.Web.Services.Protocols.SoapHeaderException: null: Must specify a nameField of type Text or AutoNumber

my code is as follows:

metaforce.CustomObject co = new metaforce.CustomObject();
                co.deploymentStatus = metaforce.DeploymentStatus.Deployed;
                co.deploymentStatusSpecified = true;
                co.description = "My Custom Object created from .NET";
                co.fullName = "DotNetCustomObject__c";
                co.label = "DotNet Custom Object";
                co.pluralLabel = "DotNet Custom Objects";
                co.sharingModel = metaforce.SharingModel.ReadWrite;
                co.sharingModelSpecified = true;
                co.enableActivities = true;


                CustomField nf = new CustomField();
                nf.type=FieldType.Text;
                nf.label= "DotNetCustomObject__c"+" Name";
                co.nameField = nf;
                SaveResult[] results = ms.createMetadata(new metaforce.Metadata[] { co });
Public class AccShare{
QueryResult result = conn.query("SELECT Id FROM Account WHERE GroupId = '00Ge0000000GrKK' & Account_Type__c = 'SAM Managed'");
// Create a new AccountShare object
List<AccountShare> shares = new ArrayList<AccountShare>();
for (SObject rec : result.getRecords()) { 
     AccountShare share = new AccountShare();
    share.setAccountId(rec.getId());
    //Set the portal user Id to share the accounts with
    share.setUserOrGroupId("00Ge0000000GrGX");
    share.setAccountAccessLevel("Edit");
    share.setOpportunityAccessLevel("Read");
    share.setCaseAccessLevel("Edit");
    shares.add(share);
}
conn.create(shares.toArray(new AccountShare[shares.size()]));

  • January 15, 2014
  • Like
  • 0