• Thota Rakesh 1
  • NEWBIE
  • 104 Points
  • Member since 2015

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 19
    Likes Given
  • 0
    Questions
  • 15
    Replies
Hi all,

How to Update Converted Leads in Spring 16, please help me.


Thank you,

 
Hi All,


When ever new Account record is successfully created  the create the corresponding  contact record for the account with
account name as contact lastname
account phone as contact phone
Can we change the data type of BillingCounrty field (text to picklist) of Billing address in Contact Object..?
 
Is there a way to include null values in a Trigger.new record? It looks like the record only includes non-null. In an "after update" trigger, I post the data to an external system to be updated, and I need to know what fields have been removed. I haven't been able to find any information on this.

Thanks.
Hi,

I am using FIND query on KnowledgeArticleVersion object. The record limit of SOSL query is 2000. SO how to retrieve more than 2000 records? I am calling Salesorce SOAP API with the search query to retrieve records. 

Also in this query OFFSET is not working, 

Thanks
Hi I am trying to fetch multiple objects and their records with the Task to display on VF pages. I know I can achive this using SOSL but we provide managed packages for the users so I cannot go with SOSL as it needs maintanence. I tried using SOQL but can only query one object at a time the query is Dynamic SOQL. Instead can I write the Dynamic SOQL query in For loop to achive this. Suggestions please. thanks 
Hello,

 I am writing a code. where i am uploading a logo. Now my issue is when my image size is more than 5 mb then it shows error message seperated like this "Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 156.812KB". I want that it should throw eeror pop up message on the same window



public with sharing class DocumentController {
 public Feedback_Main__c feedbackmain{get;set;}
 public ID folderid{get;set;}
 public Blob file{get;set;}

public DocumentController() {
feedbackmain = new Feedback_Main__c();
Organization org =[select Id,InstanceName from Organization limit 1];

//List<String>AcutalBaseUrl =BaseUrl.split('.');
//system.debug('AcutalBaseUrl'+AcutalBaseUrl[0]);
 }

public PageReference Manage(){
PageReference pg = new PageReference('apex/SBAddQuestionPage');
pg.setRedirect(true);
return pg;
}

public PageReference saveAndRedirect() {
 Id OrgId = UserInfo.getOrganizationId();
 Folder FolderObj = [Select Id From Folder Where Name = 'Survey Builder' limit 1];
 Document d= new Document();

 d.name = 'LOGO';
 d.body=file; // body field in document object which holds the file.
 d.IsPublic = true;
 d.ContentType ='image/png';
 d.Type = 'png';

 d.folderid = FolderObj.Id; //folderid where the document will be stored insert d;
 if (Document.SObjectType.getDescribe().isCreateable())
 {
 try{
     insert d;
     }
    catch (DMLException e)   {    
                          // catch (System.LimitException e) {
                             ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'File Size is more than 5MB'));
                           return null;
                        }
      
 }
Organization org =[select Id,InstanceName from Organization limit 1];
//(Sandbox)feedbackmain.Image__c = '<img src="https://c.cs41.content.force.com/servlet/servlet.ImageServer?id='+d.id+'&oid='+OrgId+'"></img>';
feedbackmain.Image__c = '<img src="https://c.'+org.InstanceName+'.content.force.com/servlet/servlet.ImageServer?id='+d.id+'&oid='+OrgId+'"></img>';

 
  system.debug('++++++++++D ID+++++++++++'+feedbackmain.Image__c);
  insert feedbackmain; // This takes care of the details for you.
  PageReference redirectPage = Page.SBAddQuestionPage;
  redirectPage.setRedirect(true);
  return redirectPage;
}


}


VF Page:
<apex:page controller="DocumentController" sidebar="false" showHeader="false" standardStylesheets="true" docType="html-5.0">
<apex:form >
<apex:pageMessages ></apex:pageMessages>
<html>
<head>

<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Create Survey</title>
<apex:stylesheet value="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900"/>
<apex:stylesheet value="{!$Resource.SurveyMaster}"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"/ >
<!--<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900" rel="stylesheet" type="text/css">
<link href="assets/css/master.css" rel="stylesheet">-->

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
<!--$(document).ready(function(){
    $(".NextOne").click(function(){
        $(".NameDiv").hide();
        $(".HeaderFooterDiv").show();
        return false;
    });
});

$(document).ready(function(){
    $(".NextTwo").click(function(){
        $(".HeaderFooterDiv").hide();
        $(".ContactDiv").show();
        return false;
    });
});-->

function CheckFbName(ReceiveInputID){
    var inputValue = document.getElementById(ReceiveInputID).value;
    if(inputValue.length==0 || inputValue == ''){
        alert("Please enter Survey Name.");
        $(".NextOne").click(function(){
            $(".NameDiv").show();
            $(".HeaderFooterDiv").hide();
            $(".ContactDiv").hide();
            return false;
        });
    }
    else
        $(".NextOne").click(function(){
        $(".NameDiv").hide();
        $(".HeaderFooterDiv").show();
        $(".ContactDiv").hide();
        return false;
    });
}

function myFunction() {
    window.open("https://cs41.salesforce.com/apex/AddQuestionPage");
}


</script>
<style>
.lookupIcon {
 background-image: url('{!$Resource.LookupIcon}') !important;
 height:30px !important;
 width:30px !important;
 position:absolute !important;
 top:6px !important;
 right:-25px !important;
}

.lookupIconOn {
 background-image: url('{!$Resource.LookupIcon}') !important;
 height:30px !important;
 width:30px !important;
 position:absolute !important;
 top:6px !important;
 right:-25px !important;
}

@import url(http://fonts.googleapis.com/css?family=Nunito:300);

body { font-family: "Nunito", sans-serif; font-size: 24px; }
a    { text-decoration: none; }
p    { text-align: center; }
sup  { font-size: 36px; font-weight: 100; line-height: 55px; }

.button
{
    text-transform: none;
    letter-spacing: 0px;
    text-align: center;
    color: #0C5;
    font-size: 20px;
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    position: absolute;
    top: 11px;
    right: 0;
    bottom: 0;
    left: 56.6%;
    padding: 10px 0;
    width: 236px;
    height: 43px;
    background: #00a1e1;
    border: 1px solid #00a1e1;
    color: #FFF;
    overflow: hidden;
    transition: all 0.5s;
    float: right !important;
    border-radius: 20px;
}

.button:hover, .button:active
{
  text-decoration: none;
  color: #00a1e1;/*#0C5*/
  border-color: #00a1e1;
  background: #FFF;
}

.button span
{
  display: inline-block;
  position: relative;
  padding-right: 0;
 
  transition: padding-right 0.5s;
}

.button span:after
{
  content: ' ';  
  position: absolute;
  top: 0;
  right: -18px;
  opacity: 0;
  width: 10px;
  height: 10px;
  margin-top: -10px;

  background: rgba(0, 0, 0, 0);
  border: 3px solid #FFF;
  border-top: none;
  border-right: none;

  transition: opacity 0.5s, top 0.5s, right 0.5s;
  transform: rotate(-135deg);
}

.button:hover span, .button:active span
{
  padding-right: 30px;
}

.button:hover span:after, .button:active span:after
{
  transition: opacity 0.5s, top 0.5s, right 0.5s;
  opacity: 1;
  border-color: #00a1e1;
  right: 10px;
  top: 70%;
}
</style>
</head>
<body>
<header class="mainHeader">
    <div class="container clear">
        <a href="/apex/SBIndex" class="logo"><img src="{!$Resource.MainLogo}" alt=""/></a>
        <div class="nav">
            <ul>
                <li><a href="/apex/SBIndex" class="home"><img src="{!$Resource.HomeIcon}" alt=""/></a></li>
                <li><a href="/apex/SBQuestionBank">Question Bank</a></li>
                <li class="active"><a href="/apex/SBCreateSurvey">Create Survey</a></li>
                <li><a href="/apex/SBSendSurvey">Send Survey</a></li>
                <li><a href="/apex/SBREPORT">Report</a></li>
            </ul>
        </div>
    </div>
</header>
<section class="page-name">
    <div class="container clear">
        <h2>Create Survey</h2>
    </div>
</section>
<section class="bodyContainer">
    <div class="container clear">
        <div class="white-box">
            <div class="mainForm">
                <!--<apex:commandButton value="View Existing Surveys" action="{!Manage}" styleClass="green-btn" style="float:right !important;"/>-->
                <a href="/apex/SBAddQuestionPage" class="button"><span>View Existing Surveys</span></a>
                <hr />
                <div class="formFeild">
                    <label>Please enter the name for survey:</label>
                    <div class="feild">
                        <apex:inputText value="{!feedbackmain.Feedback_Name__c}" html-placeholder="Enter name for the survey" id="FbName" required="true" rendered="true"/>
                    </div>
                </div>
                <div class="formFeild">
                    <label>Upload Logo (5 MB Max. size):</label>
                    <div class="feild">
                        <apex:inputfile value="{!file}"  ></apex:inputfile>
                  <!--     <apex:inputTextarea richText="true" value="{!feedbackmain.Image__c}"  html-placeholder="Logo" styleClass="text-editor"/> -->
                    </div>
                </div>
                <div class="formFeild">
                    <label>Header Text:</label>
                    <div class="feild">
                        <apex:inputTextarea value="{!feedbackmain.Header_Text__c}" html-placeholder="Header Text"/>
                    </div>
                </div>
                <div class="formFeild">
                    <label>Footer Text:</label>
                    <div class="feild">
                        <apex:inputTextarea value="{!feedbackmain.Footer_text__c}" html-placeholder="Footer Text"/>
                    </div>
                </div>
                <div class="formFeild">
                    <label>Survey Owner:</label>
                  <div class="feild">
                    <apex:inputField value="{!feedbackmain.Feedback_Taken_by_Contact__c}" required="true"/>
                        <!--<div class="outside-btn">
                            <a href="" class="survey-btn"><img src="assets/images/survey-view-btn.png" alt=""/></a>
                        </div>-->
                    </div>
                </div>
                <div class="formFeild">
                    <label>&nbsp;</label>
                    <div class="feild">
                       <apex:commandButton value="Save" action="{!saveAndRedirect}" style="display: inline-block !important; padding:3px 15px !important; line-height:35px !important; color:#fff !important; font-size:15px !important; background:#75C181 !important; border-radius:35px !important; margin-bottom:15px !important; min-width:125px !important; text-align:center !important;"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<footer class="main-footer">
    <ul>
        <li><a href="#" style="font-size: 17px;">Privacy Policy</a></li>
        <li><a href="#" style="font-size: 17px;">Terms of Services</a></li>
    </ul>
    <div class="copyright" style="font-size: 17px;">© 2016 Survey Builder, All rights reserved. </div>
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</body>
</html>
</apex:form>
</apex:page>
Hello, 
I have a requirement where i need to add an error message next to the website field if the submitted value is not valid. Also, I have a logic to validate this field. I do not want to use addMessage.

Any suggestions?
Hi all,

How to Update Converted Leads in Spring 16, please help me.


Thank you,

 
Hi All,


When ever new Account record is successfully created  the create the corresponding  contact record for the account with
account name as contact lastname
account phone as contact phone
how do you add 10 new users to profile - standard employee
Hi All,

Q). what is the difference between actionFunction and actionSupport, Explain with funcionality?

can anyone reply for this post...
Thanks in advance..
Hi Team,
We have task,Whenever we entering in opportunity fields it should create a brand new task along with opportunity name.after creating automatic task it should assign some other user not for opportunity owner, along with email notification like "task has been assigned to you".Once he will complete the task again completion mail should sent to Opportunity Owner and their manager like "Your task has been completd". 
Is this possible to one Trigger for all senarios?  
How we will achieve this senarios.
Please help us for this.

Thanks in Advance
  • August 24, 2016
  • Like
  • 1
Can we change the data type of BillingCounrty field (text to picklist) of Billing address in Contact Object..?
 
Service contract history reporting is not available and idea has not been promoted to a fix yet. 
In the interim, I was told to create a VF page that could possibly provide access to or ability to report on service contract history.
I have enabled the autocomplete lookup functionality for my Org but Its not working for my custom lookup.
Strange think is whenever I add one of Standard lookup field like "Owner" its start working for both Custom and Standard lookup.

Any one face same problem.

Thanks!
Hi,
     I am using XML Spread sheet code in visual force page which generates Multisheets,there is a requirement i should put color for cell based on condition,For ex:if cell contains property 10% the put RED color,If it contains Property 20% then put BLUE color.But i din get the approach to put condition in Visualforce page.I tried to achieve this taking an example program that i have written below,

<apex:page controller="ExcelControllerCheck2" contentType="txt/xml#myTest.xls" cache="true">
<apex:outputText value="{!xlsHeader}"/>

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
     xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
  <Styles>
   <Style ss:ID="s1">
   <Alignment/>
   <Borders/>
   <Font ss:Bold="1" ss:Color="RED"/>
   <Interior ss:Pattern='Solid' ss:Color="#B8B8B8"/>
    <NumberFormat/>
    <Protection/>
  </Style>
  
   <Style ss:ID="s2">
   <Alignment/>
   <Borders/>
   <Font ss:Color="BLUE"/>
    <NumberFormat/>
    <Protection/>
   </Style>
   
  
     <!--
     <Style ss:ID="s2">
   <Alignment/>
   <Borders/>
   <Font ss:Bold="1" />

   <Interior ss:Color="Gray75"/>
    <NumberFormat/>
    <Protection/>
     </Style>
     -->
   </Styles>
 
<Worksheet ss:Name="Accounts">
  <Table x:FullColumns="1" x:FullRows="1">
  <Column ss:Width="170"/>
  <Row>
<Cell ss:StyleID="s1"><Data ss:Type="String" >Account Name</Data></Cell>
</Row>
  <apex:repeat value="{!accountList}" var="account">
  <Row>
<Cell><Data ss:Type="String">{!account.name}</Data></Cell>
</Row>
</apex:repeat>
</Table>
</Worksheet>

<Worksheet ss:Name="Contacts">

<WorksheetOptions
xmlns="urn:schemas-microsoft-com:office:excel">
<Selected/>
<FreezePanes/>
<FrozenNoSplit/>

<!--- Right-most column number of left pane. --->
<SplitVertical>1</SplitVertical>
<SplitVertical>2</SplitVertical>
<!---
Offset column of right frame. This is not the actual
column number of the overall Excel document, but rather
the index of the available column for this pane. This
number cannot exclude columns, it can merely set the
offset scroll of this pane. (1) scrolls to the left of
the frame (first column).
--->
<LeftColumnRightPane>1</LeftColumnRightPane>
<LeftColumnRightPane>2</LeftColumnRightPane>
</WorksheetOptions>

<Table x:FullColumns="1" x:FullRows="1">
  <Column ss:Width="170"/>
  <Column ss:Width="280"/>
  <Column ss:Width="330"/>
  <Column ss:Width="550" />
  <Row>
  <Cell ss:StyleID="s1"><Data ss:Type="String">Contact Name</Data></Cell>
   <Cell ss:StyleID="s1"><Data ss:Type="String" >Last Name</Data></Cell>
   <Cell ss:StyleID="s1"><Data ss:Type="String" >Account Name</Data></Cell>
   <Cell ss:StyleID="s1" ><Data ss:Type="String" >Created Date</Data></Cell>
  </Row>
  <apex:repeat value="{!contactList}" var="contact">
  <Row>
  <Cell ss:StyleID="s2"><Data ss:Type="String">{!contact.name}</Data></Cell>
<Cell><Data ss:Type="String">{!contact.lastName}</Data></Cell>
  <Cell><Data ss:Type="String">{!contact.account.name}</Data></Cell>
   <Cell><Data ss:Type="String"><apex:outputText value=" {0,date,M/d/yyy, h:mm a}">
    <apex:param value="{!contact.CreatedDate}" />
</apex:outputText></Data></Cell>
   </Row>
</apex:repeat>
</Table>

</Worksheet>
</Workbook>

</apex:page>



And also  i need to put color for <Worksheet ss:Name="Account"> .Please if anyone knows post the answer,It will help a lot.

Thanks.
Is there a way to include null values in a Trigger.new record? It looks like the record only includes non-null. In an "after update" trigger, I post the data to an external system to be updated, and I need to know what fields have been removed. I haven't been able to find any information on this.

Thanks.
Hi, Can anyone help me out with this,
User-added image
This is from a custom object " Quotation", The look up field " Main Driver" is a look up to Personal account object. The below fields are as well exists in the personal account. I need whatever value would be choosen in the main driver, automatically the below values will get pop up on below fields. I need to write a trigger for this ( I cant use formula field, as its depends upon another criteria field, so somtimes the user need to enter values manually in these fields , Process builder also doesnt worked).
I tried to write a trigger, but its not working , showing issue as " Error: Compile Error: IN operator must be used with an iterable expression at line 12 column 104 " Can anyone plz rectify my trigger to make it work. Thnx .( I just have taken two fields below for test)


trigger MainDriverRelatedFields on Quotation__c (before insert,before update) {

Quotation__c newQuote=new Quotation__c();
 
for(Quotation__c obj : Trigger.new){
newQuote=obj ;
    }
    List<Account> Acc= [SELECT id,Age__c, Acccidents_in_the_last_12_mnths__c FROM Account WHERE Id IN: newQuote.Main_Driver__r];
     if(newQuote.Main_Driver__c!=null) {
            newQuote.AgeMainD__c=Acc.Age__c;

            newQuote.Accidents_in_the_last_12_mnthsMainD__c= Acc.Acccidents_in_the_last_12_mnths__c;

        }
}




 
Hi,

I am using FIND query on KnowledgeArticleVersion object. The record limit of SOSL query is 2000. SO how to retrieve more than 2000 records? I am calling Salesorce SOAP API with the search query to retrieve records. 

Also in this query OFFSET is not working, 

Thanks
Hi I am trying to fetch multiple objects and their records with the Task to display on VF pages. I know I can achive this using SOSL but we provide managed packages for the users so I cannot go with SOSL as it needs maintanence. I tried using SOQL but can only query one object at a time the query is Dynamic SOQL. Instead can I write the Dynamic SOQL query in For loop to achive this. Suggestions please. thanks 
Hi Team,

We have created Two batch classes using different objects(Account and Opportunity) for updating the Teammembrs which are working fine.But my problem is i want to include onebatch class instead of two batch class.Can any one please help on this.

Thanks
Hello,

 I am writing a code. where i am uploading a logo. Now my issue is when my image size is more than 5 mb then it shows error message seperated like this "Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 156.812KB". I want that it should throw eeror pop up message on the same window



public with sharing class DocumentController {
 public Feedback_Main__c feedbackmain{get;set;}
 public ID folderid{get;set;}
 public Blob file{get;set;}

public DocumentController() {
feedbackmain = new Feedback_Main__c();
Organization org =[select Id,InstanceName from Organization limit 1];

//List<String>AcutalBaseUrl =BaseUrl.split('.');
//system.debug('AcutalBaseUrl'+AcutalBaseUrl[0]);
 }

public PageReference Manage(){
PageReference pg = new PageReference('apex/SBAddQuestionPage');
pg.setRedirect(true);
return pg;
}

public PageReference saveAndRedirect() {
 Id OrgId = UserInfo.getOrganizationId();
 Folder FolderObj = [Select Id From Folder Where Name = 'Survey Builder' limit 1];
 Document d= new Document();

 d.name = 'LOGO';
 d.body=file; // body field in document object which holds the file.
 d.IsPublic = true;
 d.ContentType ='image/png';
 d.Type = 'png';

 d.folderid = FolderObj.Id; //folderid where the document will be stored insert d;
 if (Document.SObjectType.getDescribe().isCreateable())
 {
 try{
     insert d;
     }
    catch (DMLException e)   {    
                          // catch (System.LimitException e) {
                             ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'File Size is more than 5MB'));
                           return null;
                        }
      
 }
Organization org =[select Id,InstanceName from Organization limit 1];
//(Sandbox)feedbackmain.Image__c = '<img src="https://c.cs41.content.force.com/servlet/servlet.ImageServer?id='+d.id+'&oid='+OrgId+'"></img>';
feedbackmain.Image__c = '<img src="https://c.'+org.InstanceName+'.content.force.com/servlet/servlet.ImageServer?id='+d.id+'&oid='+OrgId+'"></img>';

 
  system.debug('++++++++++D ID+++++++++++'+feedbackmain.Image__c);
  insert feedbackmain; // This takes care of the details for you.
  PageReference redirectPage = Page.SBAddQuestionPage;
  redirectPage.setRedirect(true);
  return redirectPage;
}


}


VF Page:
<apex:page controller="DocumentController" sidebar="false" showHeader="false" standardStylesheets="true" docType="html-5.0">
<apex:form >
<apex:pageMessages ></apex:pageMessages>
<html>
<head>

<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Create Survey</title>
<apex:stylesheet value="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900"/>
<apex:stylesheet value="{!$Resource.SurveyMaster}"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"/ >
<!--<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900" rel="stylesheet" type="text/css">
<link href="assets/css/master.css" rel="stylesheet">-->

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
<!--$(document).ready(function(){
    $(".NextOne").click(function(){
        $(".NameDiv").hide();
        $(".HeaderFooterDiv").show();
        return false;
    });
});

$(document).ready(function(){
    $(".NextTwo").click(function(){
        $(".HeaderFooterDiv").hide();
        $(".ContactDiv").show();
        return false;
    });
});-->

function CheckFbName(ReceiveInputID){
    var inputValue = document.getElementById(ReceiveInputID).value;
    if(inputValue.length==0 || inputValue == ''){
        alert("Please enter Survey Name.");
        $(".NextOne").click(function(){
            $(".NameDiv").show();
            $(".HeaderFooterDiv").hide();
            $(".ContactDiv").hide();
            return false;
        });
    }
    else
        $(".NextOne").click(function(){
        $(".NameDiv").hide();
        $(".HeaderFooterDiv").show();
        $(".ContactDiv").hide();
        return false;
    });
}

function myFunction() {
    window.open("https://cs41.salesforce.com/apex/AddQuestionPage");
}


</script>
<style>
.lookupIcon {
 background-image: url('{!$Resource.LookupIcon}') !important;
 height:30px !important;
 width:30px !important;
 position:absolute !important;
 top:6px !important;
 right:-25px !important;
}

.lookupIconOn {
 background-image: url('{!$Resource.LookupIcon}') !important;
 height:30px !important;
 width:30px !important;
 position:absolute !important;
 top:6px !important;
 right:-25px !important;
}

@import url(http://fonts.googleapis.com/css?family=Nunito:300);

body { font-family: "Nunito", sans-serif; font-size: 24px; }
a    { text-decoration: none; }
p    { text-align: center; }
sup  { font-size: 36px; font-weight: 100; line-height: 55px; }

.button
{
    text-transform: none;
    letter-spacing: 0px;
    text-align: center;
    color: #0C5;
    font-size: 20px;
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    position: absolute;
    top: 11px;
    right: 0;
    bottom: 0;
    left: 56.6%;
    padding: 10px 0;
    width: 236px;
    height: 43px;
    background: #00a1e1;
    border: 1px solid #00a1e1;
    color: #FFF;
    overflow: hidden;
    transition: all 0.5s;
    float: right !important;
    border-radius: 20px;
}

.button:hover, .button:active
{
  text-decoration: none;
  color: #00a1e1;/*#0C5*/
  border-color: #00a1e1;
  background: #FFF;
}

.button span
{
  display: inline-block;
  position: relative;
  padding-right: 0;
 
  transition: padding-right 0.5s;
}

.button span:after
{
  content: ' ';  
  position: absolute;
  top: 0;
  right: -18px;
  opacity: 0;
  width: 10px;
  height: 10px;
  margin-top: -10px;

  background: rgba(0, 0, 0, 0);
  border: 3px solid #FFF;
  border-top: none;
  border-right: none;

  transition: opacity 0.5s, top 0.5s, right 0.5s;
  transform: rotate(-135deg);
}

.button:hover span, .button:active span
{
  padding-right: 30px;
}

.button:hover span:after, .button:active span:after
{
  transition: opacity 0.5s, top 0.5s, right 0.5s;
  opacity: 1;
  border-color: #00a1e1;
  right: 10px;
  top: 70%;
}
</style>
</head>
<body>
<header class="mainHeader">
    <div class="container clear">
        <a href="/apex/SBIndex" class="logo"><img src="{!$Resource.MainLogo}" alt=""/></a>
        <div class="nav">
            <ul>
                <li><a href="/apex/SBIndex" class="home"><img src="{!$Resource.HomeIcon}" alt=""/></a></li>
                <li><a href="/apex/SBQuestionBank">Question Bank</a></li>
                <li class="active"><a href="/apex/SBCreateSurvey">Create Survey</a></li>
                <li><a href="/apex/SBSendSurvey">Send Survey</a></li>
                <li><a href="/apex/SBREPORT">Report</a></li>
            </ul>
        </div>
    </div>
</header>
<section class="page-name">
    <div class="container clear">
        <h2>Create Survey</h2>
    </div>
</section>
<section class="bodyContainer">
    <div class="container clear">
        <div class="white-box">
            <div class="mainForm">
                <!--<apex:commandButton value="View Existing Surveys" action="{!Manage}" styleClass="green-btn" style="float:right !important;"/>-->
                <a href="/apex/SBAddQuestionPage" class="button"><span>View Existing Surveys</span></a>
                <hr />
                <div class="formFeild">
                    <label>Please enter the name for survey:</label>
                    <div class="feild">
                        <apex:inputText value="{!feedbackmain.Feedback_Name__c}" html-placeholder="Enter name for the survey" id="FbName" required="true" rendered="true"/>
                    </div>
                </div>
                <div class="formFeild">
                    <label>Upload Logo (5 MB Max. size):</label>
                    <div class="feild">
                        <apex:inputfile value="{!file}"  ></apex:inputfile>
                  <!--     <apex:inputTextarea richText="true" value="{!feedbackmain.Image__c}"  html-placeholder="Logo" styleClass="text-editor"/> -->
                    </div>
                </div>
                <div class="formFeild">
                    <label>Header Text:</label>
                    <div class="feild">
                        <apex:inputTextarea value="{!feedbackmain.Header_Text__c}" html-placeholder="Header Text"/>
                    </div>
                </div>
                <div class="formFeild">
                    <label>Footer Text:</label>
                    <div class="feild">
                        <apex:inputTextarea value="{!feedbackmain.Footer_text__c}" html-placeholder="Footer Text"/>
                    </div>
                </div>
                <div class="formFeild">
                    <label>Survey Owner:</label>
                  <div class="feild">
                    <apex:inputField value="{!feedbackmain.Feedback_Taken_by_Contact__c}" required="true"/>
                        <!--<div class="outside-btn">
                            <a href="" class="survey-btn"><img src="assets/images/survey-view-btn.png" alt=""/></a>
                        </div>-->
                    </div>
                </div>
                <div class="formFeild">
                    <label>&nbsp;</label>
                    <div class="feild">
                       <apex:commandButton value="Save" action="{!saveAndRedirect}" style="display: inline-block !important; padding:3px 15px !important; line-height:35px !important; color:#fff !important; font-size:15px !important; background:#75C181 !important; border-radius:35px !important; margin-bottom:15px !important; min-width:125px !important; text-align:center !important;"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<footer class="main-footer">
    <ul>
        <li><a href="#" style="font-size: 17px;">Privacy Policy</a></li>
        <li><a href="#" style="font-size: 17px;">Terms of Services</a></li>
    </ul>
    <div class="copyright" style="font-size: 17px;">© 2016 Survey Builder, All rights reserved. </div>
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</body>
</html>
</apex:form>
</apex:page>
Hello, 
I have a requirement where i need to add an error message next to the website field if the submitted value is not valid. Also, I have a logic to validate this field. I do not want to use addMessage.

Any suggestions?
Hi all,

How to Update Converted Leads in Spring 16, please help me.


Thank you,

 
Hi All,


When ever new Account record is successfully created  the create the corresponding  contact record for the account with
account name as contact lastname
account phone as contact phone
how do you add 10 new users to profile - standard employee
Hi All,

Q). what is the difference between actionFunction and actionSupport, Explain with funcionality?

can anyone reply for this post...
Thanks in advance..
Hi Team,
We have task,Whenever we entering in opportunity fields it should create a brand new task along with opportunity name.after creating automatic task it should assign some other user not for opportunity owner, along with email notification like "task has been assigned to you".Once he will complete the task again completion mail should sent to Opportunity Owner and their manager like "Your task has been completd". 
Is this possible to one Trigger for all senarios?  
How we will achieve this senarios.
Please help us for this.

Thanks in Advance
  • August 24, 2016
  • Like
  • 1
Can we change the data type of BillingCounrty field (text to picklist) of Billing address in Contact Object..?
 
Hi,

Can  any body tell me the difference betwen the getvalues() and getinstance () methods  customsettings.


Regards,
Siva.
Service contract history reporting is not available and idea has not been promoted to a fix yet. 
In the interim, I was told to create a VF page that could possibly provide access to or ability to report on service contract history.
I have enabled the autocomplete lookup functionality for my Org but Its not working for my custom lookup.
Strange think is whenever I add one of Standard lookup field like "Owner" its start working for both Custom and Standard lookup.

Any one face same problem.

Thanks!
Hi,
     I am using XML Spread sheet code in visual force page which generates Multisheets,there is a requirement i should put color for cell based on condition,For ex:if cell contains property 10% the put RED color,If it contains Property 20% then put BLUE color.But i din get the approach to put condition in Visualforce page.I tried to achieve this taking an example program that i have written below,

<apex:page controller="ExcelControllerCheck2" contentType="txt/xml#myTest.xls" cache="true">
<apex:outputText value="{!xlsHeader}"/>

<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
     xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
  <Styles>
   <Style ss:ID="s1">
   <Alignment/>
   <Borders/>
   <Font ss:Bold="1" ss:Color="RED"/>
   <Interior ss:Pattern='Solid' ss:Color="#B8B8B8"/>
    <NumberFormat/>
    <Protection/>
  </Style>
  
   <Style ss:ID="s2">
   <Alignment/>
   <Borders/>
   <Font ss:Color="BLUE"/>
    <NumberFormat/>
    <Protection/>
   </Style>
   
  
     <!--
     <Style ss:ID="s2">
   <Alignment/>
   <Borders/>
   <Font ss:Bold="1" />

   <Interior ss:Color="Gray75"/>
    <NumberFormat/>
    <Protection/>
     </Style>
     -->
   </Styles>
 
<Worksheet ss:Name="Accounts">
  <Table x:FullColumns="1" x:FullRows="1">
  <Column ss:Width="170"/>
  <Row>
<Cell ss:StyleID="s1"><Data ss:Type="String" >Account Name</Data></Cell>
</Row>
  <apex:repeat value="{!accountList}" var="account">
  <Row>
<Cell><Data ss:Type="String">{!account.name}</Data></Cell>
</Row>
</apex:repeat>
</Table>
</Worksheet>

<Worksheet ss:Name="Contacts">

<WorksheetOptions
xmlns="urn:schemas-microsoft-com:office:excel">
<Selected/>
<FreezePanes/>
<FrozenNoSplit/>

<!--- Right-most column number of left pane. --->
<SplitVertical>1</SplitVertical>
<SplitVertical>2</SplitVertical>
<!---
Offset column of right frame. This is not the actual
column number of the overall Excel document, but rather
the index of the available column for this pane. This
number cannot exclude columns, it can merely set the
offset scroll of this pane. (1) scrolls to the left of
the frame (first column).
--->
<LeftColumnRightPane>1</LeftColumnRightPane>
<LeftColumnRightPane>2</LeftColumnRightPane>
</WorksheetOptions>

<Table x:FullColumns="1" x:FullRows="1">
  <Column ss:Width="170"/>
  <Column ss:Width="280"/>
  <Column ss:Width="330"/>
  <Column ss:Width="550" />
  <Row>
  <Cell ss:StyleID="s1"><Data ss:Type="String">Contact Name</Data></Cell>
   <Cell ss:StyleID="s1"><Data ss:Type="String" >Last Name</Data></Cell>
   <Cell ss:StyleID="s1"><Data ss:Type="String" >Account Name</Data></Cell>
   <Cell ss:StyleID="s1" ><Data ss:Type="String" >Created Date</Data></Cell>
  </Row>
  <apex:repeat value="{!contactList}" var="contact">
  <Row>
  <Cell ss:StyleID="s2"><Data ss:Type="String">{!contact.name}</Data></Cell>
<Cell><Data ss:Type="String">{!contact.lastName}</Data></Cell>
  <Cell><Data ss:Type="String">{!contact.account.name}</Data></Cell>
   <Cell><Data ss:Type="String"><apex:outputText value=" {0,date,M/d/yyy, h:mm a}">
    <apex:param value="{!contact.CreatedDate}" />
</apex:outputText></Data></Cell>
   </Row>
</apex:repeat>
</Table>

</Worksheet>
</Workbook>

</apex:page>



And also  i need to put color for <Worksheet ss:Name="Account"> .Please if anyone knows post the answer,It will help a lot.

Thanks.