• Guru Vemuru 1
  • NEWBIE
  • 60 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 44
    Replies
Hi all,

I have a requirement to sent email alert to lead owner  and conditions are like
  1. Alert will go to lead owner after 2 hours from lead created time
  2. Lead owner will get mail only Week days and not in week ends
Hi all,
 I am creating Visualforce  email template to add Signature, whenever user send mail other people.
1.In that template i have to fetch uer data like NAME, DIVISION...   .
2.So I created fields in User object and trying to fetch data from user object.
3.when Use send test and verify merge fields showing data,But when we send mail from contact it is fetch data from user .
4. And logo also not displaying.

Here is my code:

<messaging:emailTemplate subject="Regarding Student" recipientType="Lead" relatedToType="user">
<messaging:plainTextEmailBody >

{!RelatedTo.FirstName} {!RelatedTo.LastName}
_____________________________________________
Continental
Division  {!RelatedTo.Division__c}
Segment   {!RelatedTo.Segment__c}
Rechnungsanschrift/Billing address {!RelatedTo.Billing_Address__c}
Mobile            {!RelatedTo.MobilePhone}
Email             {!RelatedTo.Email}  
Visit us @        {!RelatedTo.URL__c}
______________________________________________

http://www.continental-corporation.com  

<img src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest"
    width="200" height="200"/>

</messaging:plainTextEmailBody>
</messaging:emailTemplate>

Privew:

Guru 
_____________________________________________
Continental 
Division  
Segment   IT
Rechnungsanschrift/Billing address Jeevan Bhema Nagar
Mobile            (
Email             vguru.com 
Visit us @        www. guru.com
______________________________________________

http://www.continental-corporation.com  

<img height="200" src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest" width="200" />
 
Hi,

I have Two objects Invoice__c and Test_Search__c. Now i am gona search record of invoce from Test_Search__c object.
Now i want save the record in Test_Search__c.
I written class and page.
i am able to search record but unable to save record in Test_search__c object.

Class:

public class theController {

    public theController(ApexPages.StandardController controller) {

    }


   String searchText;
   List<Invoice__c> results;

   public String getSearchText() {
      return searchText;
   }

   public void setSearchText(String s) {
      searchText = s;
   }

   public List<Invoice__c> getResults() {
      return results;
   }

   public PageReference doSearch() {
      results = (list<Invoice__c>)[FIND :searchText RETURNING Invoice__c (Account_Name__c,Id,Order_Total_Before_Tax__c,Order_Total_After_Tax__c)][0];
      return null;
   }

}


Pages:
<apex:page extensions="theController"  standardController="Test_Search__c">
   <apex:form >
      <apex:pageBlock mode="edit" id="block">
         <apex:pageBlockSection >
            <apex:pageBlockSectionItem >
               <apex:outputLabel for="searchText">Search Text</apex:outputLabel>
               <apex:panelGroup >
                  <apex:inputText id="searchText" value="{!searchText}"/>
                  <apex:commandButton value="Go!" action="{!doSearch}"
                                      rerender="block" status="status"/>
               </apex:panelGroup>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
        <apex:actionStatus id="status" startText="requesting..."/>
        <apex:pageBlockSection title="Results" id="results" columns="1">
           <apex:pageBlockTable value="{!results}" var="l"
                               rendered="{!NOT(ISNULL(results))}">
              <apex:column value="{!l.Account_Name__c}"/>
              <apex:column value="{!l.Order_Total_Before_Tax__c}"/>
              <apex:column value="{!l.Order_Total_After_Tax__c}"/>
           </apex:pageBlockTable>
        
        </apex:pageBlockSection>
        <div align="center" draggable="True" >
                        <apex:commandButton action="{!Save}" value="Save"  />&nbsp;
                        <apex:commandButton action="{!Cancel}" value="Cancel"  />          
                    </div>
        
      </apex:pageBlock>
   </apex:form>
</apex:page>

 
Hi,

1. I Have Indent__c and Indent_Line_Item_c Objects which are in master detail relationship.
2. Similarly Purchase_Order__c and Order_Line_Item__c which are in master detail relationship.
3.Indent and Purchase oreder having look up relation.
4. Now i want to achive when ever user clicks on  create purchase order check box  in indent then a purchase order has to generate.(Copy of    indent) --- It is Achived Through Process builder.
5.Now when ever purchase order created then purchase order line item should create and it fetch data from Indent line item.
6. I Written one trigger but is not working properly.
    Here is My Code:

trigger createPurchaseOrderDetails on Purchase_Order__c (after insert,after update)
 {

Purchase_Order__c ord=trigger.new[0];
Indent__c oppId=[select id from Indent__c where id=:ord.Indent__c];
List<Indent_line_item__c> opplines=[select id, Quantity__c,Product__c
from Indent_line_item__c where Id=:oppId.id];

        for(Indent_line_item__c oppline:opplines){
        
        Order_Line_item__c OrderLine = new Order_Line_item__c();
        OrderLine.Product__c = oppline.Product__c;
        OrderLine.Quandity__c = oppline.Quantity__c;
        OrderLine.Unit_Price__c = oppline.Unit_Price__c;
        OrderLine.Total_Price__c = oppline.Total_Price__c;
        insert OrderLine;
    }

}

 
Apex Controller:
public with sharing class DataCompare {

    public DataCompare(ApexPages.StandardController controller) {

    }

 public Policy__c pol {get;set;}
 public string Designation{get;set;}
 public Double PerDiem{get;set;}
 public Double Advance{get;set;} 

 public void DataCompare()
  {
  
   pol = [select Name , Designation__c, Per_Diem__c, Cash_Advance__c from Policy__c  LIMIT 1];
   System.debug('The record fetched '+pol);
    
    Designation='pol.Designation__c';
    PerDiem=pol.Per_Diem__c;
    Advance=pol.Cash_Advance__c;
 }
}



Visual Force: JavaScript

<script>
 function showAlert()
            {
            var des='{!Designation}';
            var adv='{!Advance}';
            var sen = "Please confirm by refering policy";
            var amt =  document.getElementById('{!$Component.form1.TRR.TRRR.TRRRR.trAmt}').value ;
            alert("You have entered amount = "+ amt +".\n" +sen+ "" + des+ "" + adv);           
            }
  </script>



Its not showing Designation and Advance in alert box. Policy is a differnt object and script is on another object.
Hi every one,
I have application and i buit it for mobile also and i enabled mobile offline settings .
But mobile offiline is not working, can you please help me out.
 
Hi every one,
I have a list button(visual force). Now i want to hide this list button for one profile.
How can i do it.
Hi every one,

I written one formula for displaying images for different condition.

IF( Total_Lead_Score__c<20, IMAGE('/resource/1502342615000/Star1', 'Star1'),
IF( Total_Lead_Score__c<40, IMAGE('/resource/1502342589000/Star2', 'Star2'),
IF( Total_Lead_Score__c<60, IMAGE('/resource/1502342560000/Star3', 'Star3'),
IF( Total_Lead_Score__c<60, IMAGE('/resource/1502311560000/Star3', 'Star4'),
IMAGE('/resource/1502342499000/Star5','Star5')))))


This produces a Compiled formula too big error

CASE( Total_Lead_Score__c ,
Total_Lead_Score__c<20,IMAGE("/resource/1502342615000/Star1"),
Total_Lead_Score__c<40,IMAGE("/resource/1502342589000/Star2"),
Total_Lead_Score__c<40,IMAGE("/resource/1502377589000/Star3"),
Total_Lead_Score__c<40,IMAGE("/resource/15023222000/Star4"),
IMAGE("/resource/1502342560000/Star5")
)

Error: Incorrect number of parameters for function 'IMAGE()'. Expected 2, received 1
 
Hi everyone,
How to deploy application from production to sand box.
please tell me.
Hi everyone,
         
I have two objects Expense and Travel request and both are related by a lookup.
1.Travel Request has two fields like Travel_Purpose__c(Text Field) and Client_Visit__c(Look Up With Account).
2.Expense has two fields like Travel_Request__c(Look Up with Travel Request ) and Claim_Purpose__c(Text)
3.Now when i select Travel_Request__c then Claim_Purpose__c automatically in the same Editable page update like
              If(Travel_Request__c != Null)     
                    {
                         (Claim_Purpose__c= Travel_Purpose__c+Clent_Visit__c)
                     }

 
Hi Every one,
I want to write a trigger to update record for unrelated object. So that i written one trigger it showing error can any one help me out.

trigger populateExpenseFromUser on Expense__c (before insert , before update)
{
    
    Set<ID> setExpIds = new Set<ID>();
    for(Expense__c exp : trigger.new){
        if(exp.Claim_Purpose__c!= null)
        setExpIds.add(exp.Claim_Purpose__c);
    }
    
     MAP<ID , User> mapExp = new MAP<ID , User>([Select Id,Branch__c,Department__c,Designation__c from user where id in: setExpIds]);
     for(Expense__c exp : trigger.new)
       {
        if(exp.Claim_Purpose__c != null)
          {
            User tr = mapExp.get(exp.Claim_Purpose__c);
            exp.Branch__c= tr.Branch__c;
            exp.Department__c= tr.Department__c;
            exp.Designation__c=tr.Designation__c;
          //  update exp;
            
          }
       
       }

Hi everyone,
I have two objects (Travel Request and Expense) and there is lookup relation between them. Lookup field in Expense will select the record from Travel. When i select Lookup field some fields in Expense map the data from travel.



When i select Lookup Field Travel Request then Fields like Period From,Period To,Brach,Department fetch data automatically from Tavel Request.
Please tell me how can i do it

 .User-added image
Hello every one,
                        I have one application which is related to company and employee.Now  we are planing to buy Employee Portal Community i want to know the pricing for it.

Please give me the information regarding this one as much as possible.
Hi everyone,
I want write test class how to write test class
Hi all,
I want to hide one section called "Maps" and whenever I select Picklist value as "Travel" this Map section should be visible.
And these Expense map section are the two VF pages, So how should I achieve this??

Any help will be grateful!
User-added image 
 
Hi everyone,

I have Visualforce page and i want populate massage based on cirtain condition while saving the record.
Here is my code:

<apex:page standardController="Travel_Request__c" extensions="DataValidate" showHeader="true" sidebar="false" title="Travel Request"> 

    
  
  <apex:form > 
     
<script>
    function validateName(trdesID,)
    {
        var desig=document.getElementById(trdesID);
        
        
        if(pc.Designation__c == tc.Designation__c && tc.Advance__c=='Cash Advance' && tc.Amount__c > pc.Cash_Advance__c)
        {
                    var msg="HEY";
                        alert(msg);
                    return true;
           }
        
       
    }
  </script>
 <apex:slds />  
 <div class="slds-scope">
 <apex:outputPanel id="TR">
 <apex:pageBlock title="Travel Request">
 <apex:pageBlockSection columns="2" title="General Information" collapsible="false">
 
       <apex:inputField value="{!Travel_Request__c.Name}"/>   
          
       <apex:inputField value="{!Travel_Request__c.Branch__c}"/>   
       <apex:inputField value="{!Travel_Request__c.Department__c}" /> 
       <apex:inputField value="{!Travel_Request__c.Designation__c}" id="trdesigID"/> 
       <apex:inputField value="{!Travel_Request__c.Travel_Mode__c}"/>   
       <apex:inputField value="{!Travel_Request__c.Travel_Start_Date__c}"/>
       <apex:inputField value="{!Travel_Request__c.Travel_End_Date__c}"/>
        <apex:inputField value="{!Travel_Request__c.Meals_Choice__c}"/>
        <apex:inputField value="{!Travel_Request__c.Status__c}" />
       <apex:inputField value="{!Travel_Request__c.Travel_Type__c}">
        <apex:actionSupport event="onchange" rerender="TR" />
         </apex:inputField>

       <apex:inputField value="{!Travel_Request__c.Accommodation_Required__c}">
       <apex:actionSupport event="onchange" rerender="TR" />
      
                    </apex:inputField>
         <apex:inputField value="{!Travel_Request__c.Advance__c}">
        <apex:actionSupport event="onchange" rerender="TR" />
         </apex:inputField>
         <!---
         <apex:inputField value="{!Travel_Request__c.Travel_Card_Loaded__c}">
        <apex:actionSupport event="onchange" rerender="TR" />
         </apex:inputField>
         <apex:inputField value="{!Travel_Request__c.Travelers_Cheque__c}">
        <apex:actionSupport event="onchange" rerender="TR" />
         </apex:inputField>
              --->      
                </apex:pageBlockSection>                
                <apex:pageBlockSection columns="2" Title="Travel Type Information">                     
         <apex:inputField value="{!Travel_Request__c.Proposed_Countries_To_Visit__c}" rendered="{!IF( Travel_Request__c.Travel_Type__c == 'Overseas',true,false  )}" />                   
          <apex:inputField value="{!Travel_Request__c.Proposed_City__c}" rendered="{!IF( Travel_Request__c.Travel_Type__c == 'Overseas',true,false  )}" />
                   
                </apex:pageBlockSection> 
        
        
      
   <apex:pageBlockSection columns="2" collapsible="true" title="Accomodation Information" > 
   <apex:inputField value="{!Travel_Request__c.Check_In_Date__c}" 
                          rendered="{!IF( Travel_Request__c.Accommodation_Required__c == 'Yes',true,false )}" /> 
   <apex:inputField value="{!Travel_Request__c.Check_Out_Date__c}" 
                          rendered="{!IF( Travel_Request__c.Accommodation_Required__c == 'Yes',true,false )}" /> 
   <apex:inputField value="{!Travel_Request__c.City_Name__c}" 
                          rendered="{!IF( Travel_Request__c.Accommodation_Required__c == 'Yes',true,false )}" /> 
                          
         
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" collapsible="true" title="Advance Section" > 
   <apex:inputField value="{!Travel_Request__c.Amount__c}" 
                          rendered="{!IF( Travel_Request__c.Advance__c == 'Cash Advance',true,false )}" />
   <apex:inputField value="{!Travel_Request__c.Travel_card_Amount__c}" 
                      rendered="{!IF( Travel_Request__c.Advance__c == 'Travel Card Loaded',true,false )}" />
   <apex:inputField value="{!Travel_Request__c.Card_Number__c}" 
                          rendered="{!IF( Travel_Request__c.Advance__c == 'Travel Card Loaded',true,false )}" />       
                          
  <apex:inputField value="{!Travel_Request__c.Travelers_Cheque_Number__c}" 
                     rendered="{!IF( Travel_Request__c.Advance__c == 'Travelers Cheque',true,false )}" />       
                           
   <apex:inputField value="{!Travel_Request__c.Quantity__c}" 
                       rendered="{!IF( Travel_Request__c.Advance__c == 'Travelers Cheque',true,false )}" />       
                          
  <apex:inputField value="{!Travel_Request__c.Denomination__c}" 
                     rendered="{!IF( Travel_Request__c.Advance__c == 'Travelers Cheque',true,false )}" />       
                          
</apex:pageBlockSection>
</apex:pageBlock>
            <div align="center" draggable="false" >
            <apex:commandButton action="{!Save}" value="Save" oncomplete="validateName('{!$Component.trdesigID}')"/>
            <apex:commandButton action="{!Cancel}" value="Cancel"/>
            <apex:commandButton action="{!Edit}" value="Edit"/>
            </div>
</apex:outputPanel>
</div>
</apex:form>
</apex:page>
Hi Every one,
                     I have three check boxes and it have different input fields. When i select perticular checkbox respective amount field should display. same for other two also. So I have to check three conditions and respective field have to fetch.

Here is my formula:
IF(Travel_Request__r.Cash_Advance__c ==True, Travel_Request__r.Amount__c ,0,
Else If(Travel_Request__r.Travel_Card_Loaded__c ==True,  Travel_Request__r.Travel_card_Amount__c , 0 ),
Else if( Travel_Request__r.Travelers_Cheque__c ==True,( Travel_Request__r.Denomination__c * Travel_Request__r.Quantity__c),0))
)  

How can i do it with out else condition.
Hi every one,
                     Please help out Can i rerender a single input text field instead a whole section in vf?
Hi, 
    I have two custom objects are there Like Expense__c and Policy__c. In Policy__c we have master data,like Fields Cashadvance__c,...etc. 

Now i want to update Formula field in Expense__c and it has fetch data from policy__c when Designation__c in expense__c==Designation__c in policy__c. Please help me.
Hi everyone ,
                  I have a requirement to attach files to the perticular record in Drag and drop menthod. I have written VF and it is working but file is not saving in the Notes and Attachments. Please anyone can help me out.
Here is my Code:
<apex:page standardController="Expense_Line_Item__c" >
    
<body id="drop1" align="center">
    <DIV id="content" >Drop files here
        
        <DIV id="status">Drag and Drop the Receipts Here </DIV>
        <DIV id="drop2">Drop files here.</DIV>
        <DIV id="list"></DIV>
        <DIV id="list2"></DIV>
    </DIV>
    </body>
    <style type="text/css">
        html,body{
  height: 95%;
}

#drop1 {
    height: 100%;
    width: 96.5%;
    border: 2px solid blue;
    margin: 2px;
    padding: 10px;
    background-color: No Color;
    overflow:hidden;
}
#drop2 {
    height: 30%;
    width: 30%;
    border: 1px solid Blue;
    margin: 10px;
    padding: 10px;
}
#content
{
    height: 100%;
    width: 100%;
}
.hoverClass {
    background-color: blue;
}
.dropClass {
    background-color: green;
}
    </style>
    <script>
        if (window.FileReader) {
    var drop;
    var drop2;
    var fileNumber = 0;
    addEventHandler(window, 'load', function () {
        var status = document.getElementById('status');
        drop = document.getElementById('drop1');
        drop2 = document.getElementById('drop2');
        var list = document.getElementById('list');
        var list2 = document.getElementById('list2');


        function cancel(e) {
            if (e.preventDefault) {
                e.preventDefault();
            }
            return false;
        }

        // Tells the browser that we *can* drop on this target
        addEventHandler(drop, 'dragover', function (e) {
            e = e || window.event; // get window.event if e argument missing (in IE)
            if (e.preventDefault) {
                e.preventDefault();
            }
            fileNumber = fileNumber + 1;
            status.innerHTML = fileNumber;
            $("#drop1").css("background-color", '#AA0000');

            return false;
        });
        // Tells the browser that we *can* drop on this target
        addEventHandler(drop, 'dragleave', function (e) {
            e = e || window.event; // get window.event if e argument missing (in IE)
            if (e.preventDefault) {
                e.preventDefault();
            }
            fileNumber = fileNumber + 1;
            status.innerHTML = fileNumber;
            $("#drop1").css("background-color", '#FF0000');

            return false;
        });
        
        addEventHandler(drop, 'dragenter', cancel);
        addEventHandler(drop2, 'dragover', cancel);
        addEventHandler(drop2, 'dragenter', cancel);


        addEventHandler(drop, 'drop', function (e) {
            e = e || window.event; // get window.event if e argument missing (in IE)   
            if (e.preventDefault) {
                e.preventDefault();
            } // stops the browser from redirecting off to the image.

            var dt = e.dataTransfer;
            var files = dt.files;
            for (var i = 0; i < files.length; i++) {
                var file = files[i];
                var reader = new FileReader();

                //attach event handlers here...  
                reader.readAsDataURL(file);

                addEventHandler(reader, 'loadend', function (e, file) {
                    var bin = this.result;
                    var newFile = document.createElement('div');
                    newFile.innerHTML = 'Loaded : ' + file.name + ' size ' + file.size + ' B';
                    list.appendChild(newFile);
                    var fileNumber = list.getElementsByTagName('div').length;
                    status.innerHTML = fileNumber < files.length ? 'Loaded 100% of file ' + fileNumber + ' of ' + files.length + '...' : 'Done loading. processed ' + fileNumber + ' files.';

                    var img = document.createElement("img");
                    img.file = file;
                    img.src = bin;
                    list.appendChild(img);
                }.bindToEventHandler(file));
            }
            return false;
        });

        addEventHandler(drop2, 'drop', function (e) {
            e = e || window.event; // get window.event if e argument missing (in IE)   
            if (e.preventDefault) {
                e.preventDefault();
            } // stops the browser from redirecting off to the image.

            var dt = e.dataTransfer;
            var files = dt.files;
            for (var i = 0; i < files.length; i++) {
                var file = files[i];
                var reader = new FileReader();

                //attach event handlers here...  
                reader.readAsDataURL(file);

                addEventHandler(reader, 'loadend', function (e, file) {
                    var bin = this.result;
                    var newFile = document.createElement('div');
                    newFile.innerHTML = 'Loaded : ' + file.name + ' size ' + file.size + ' B';
                    list.appendChild(newFile);
                    var fileNumber = list.getElementsByTagName('div').length;
                    status.innerHTML = fileNumber < files.length ? 'Loaded2 100% of file ' + fileNumber + ' of ' + files.length + '...' : 'Done loading. processed ' + fileNumber + ' files.';

                    var img = document.createElement("img");
                    img.file = file;
                    img.src = bin;
                    list.appendChild(img);
                }.bindToEventHandler(file));
            }
            return true;
        });

        Function.prototype.bindToEventHandler = function bindToEventHandler() {
            var handler = this;
            var boundParameters = Array.prototype.slice.call(arguments);
            //create closure
            return function (e) {
                e = e || window.event; // get window.event if e argument missing (in IE)   
                boundParameters.unshift(e);
                handler.apply(this, boundParameters);
            }
        };
    });
} else {
    document.getElementById('status').innerHTML = 'Your browser does not support the HTML5 FileReader.';
}

function addFile(evt) {
    e = e || window.event; // get window.event if e argument missing (in IE)   
    if (e.preventDefault) {
        e.preventDefault();
    } // stops the browser from redirecting off to the image.

    var dt = e.dataTransfer;
    var files = dt.files;
    for (var i = 0; i < files.length; i++) {
        var file = files[i];
        var reader = new FileReader();

        //attach event handlers here...  
        reader.readAsDataURL(file);

        addEventHandler(reader, 'loadend', function (e, file) {
            var bin = this.result;
            var newFile = document.createElement('div');
            newFile.innerHTML = 'Loaded : ' + file.name + ' size ' + file.size + ' B';
            list.appendChild(newFile);
            var fileNumber = list.getElementsByTagName('div').length;
            status.innerHTML = fileNumber < files.length ? 'Loaded2 100% of file ' + fileNumber + ' of ' + files.length + '...' : 'Done loading. processed ' + fileNumber + ' files.';

            var img = document.createElement("img");
            img.file = file;
            img.src = bin;
            list.appendChild(img);
        }.bindToEventHandler(file));
    }
    return false;
}

//seperate event
function addEventHandler(obj, evt, handler) {
    if (obj.addEventListener) {
        // W3C method
        obj.addEventListener(evt, handler, false);
    } else if (obj.attachEvent) {
        // IE method.
        obj.attachEvent('on' + evt, handler);
    } else {
        // Old school method.
        obj['on' + evt] = handler;
    }
}
    </script>
</apex:page>          
Hi all,

I have a requirement to sent email alert to lead owner  and conditions are like
  1. Alert will go to lead owner after 2 hours from lead created time
  2. Lead owner will get mail only Week days and not in week ends
Hi all,

I have a requirement to sent email alert to lead owner  and conditions are like
  1. Alert will go to lead owner after 2 hours from lead created time
  2. Lead owner will get mail only Week days and not in week ends
Hi all,
 I am creating Visualforce  email template to add Signature, whenever user send mail other people.
1.In that template i have to fetch uer data like NAME, DIVISION...   .
2.So I created fields in User object and trying to fetch data from user object.
3.when Use send test and verify merge fields showing data,But when we send mail from contact it is fetch data from user .
4. And logo also not displaying.

Here is my code:

<messaging:emailTemplate subject="Regarding Student" recipientType="Lead" relatedToType="user">
<messaging:plainTextEmailBody >

{!RelatedTo.FirstName} {!RelatedTo.LastName}
_____________________________________________
Continental
Division  {!RelatedTo.Division__c}
Segment   {!RelatedTo.Segment__c}
Rechnungsanschrift/Billing address {!RelatedTo.Billing_Address__c}
Mobile            {!RelatedTo.MobilePhone}
Email             {!RelatedTo.Email}  
Visit us @        {!RelatedTo.URL__c}
______________________________________________

http://www.continental-corporation.com  

<img src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest"
    width="200" height="200"/>

</messaging:plainTextEmailBody>
</messaging:emailTemplate>

Privew:

Guru 
_____________________________________________
Continental 
Division  
Segment   IT
Rechnungsanschrift/Billing address Jeevan Bhema Nagar
Mobile            (
Email             vguru.com 
Visit us @        www. guru.com
______________________________________________

http://www.continental-corporation.com  

<img height="200" src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest" width="200" />
 
Hi,

I have Two objects Invoice__c and Test_Search__c. Now i am gona search record of invoce from Test_Search__c object.
Now i want save the record in Test_Search__c.
I written class and page.
i am able to search record but unable to save record in Test_search__c object.

Class:

public class theController {

    public theController(ApexPages.StandardController controller) {

    }


   String searchText;
   List<Invoice__c> results;

   public String getSearchText() {
      return searchText;
   }

   public void setSearchText(String s) {
      searchText = s;
   }

   public List<Invoice__c> getResults() {
      return results;
   }

   public PageReference doSearch() {
      results = (list<Invoice__c>)[FIND :searchText RETURNING Invoice__c (Account_Name__c,Id,Order_Total_Before_Tax__c,Order_Total_After_Tax__c)][0];
      return null;
   }

}


Pages:
<apex:page extensions="theController"  standardController="Test_Search__c">
   <apex:form >
      <apex:pageBlock mode="edit" id="block">
         <apex:pageBlockSection >
            <apex:pageBlockSectionItem >
               <apex:outputLabel for="searchText">Search Text</apex:outputLabel>
               <apex:panelGroup >
                  <apex:inputText id="searchText" value="{!searchText}"/>
                  <apex:commandButton value="Go!" action="{!doSearch}"
                                      rerender="block" status="status"/>
               </apex:panelGroup>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
        <apex:actionStatus id="status" startText="requesting..."/>
        <apex:pageBlockSection title="Results" id="results" columns="1">
           <apex:pageBlockTable value="{!results}" var="l"
                               rendered="{!NOT(ISNULL(results))}">
              <apex:column value="{!l.Account_Name__c}"/>
              <apex:column value="{!l.Order_Total_Before_Tax__c}"/>
              <apex:column value="{!l.Order_Total_After_Tax__c}"/>
           </apex:pageBlockTable>
        
        </apex:pageBlockSection>
        <div align="center" draggable="True" >
                        <apex:commandButton action="{!Save}" value="Save"  />&nbsp;
                        <apex:commandButton action="{!Cancel}" value="Cancel"  />          
                    </div>
        
      </apex:pageBlock>
   </apex:form>
</apex:page>

 
Hi,

1. I Have Indent__c and Indent_Line_Item_c Objects which are in master detail relationship.
2. Similarly Purchase_Order__c and Order_Line_Item__c which are in master detail relationship.
3.Indent and Purchase oreder having look up relation.
4. Now i want to achive when ever user clicks on  create purchase order check box  in indent then a purchase order has to generate.(Copy of    indent) --- It is Achived Through Process builder.
5.Now when ever purchase order created then purchase order line item should create and it fetch data from Indent line item.
6. I Written one trigger but is not working properly.
    Here is My Code:

trigger createPurchaseOrderDetails on Purchase_Order__c (after insert,after update)
 {

Purchase_Order__c ord=trigger.new[0];
Indent__c oppId=[select id from Indent__c where id=:ord.Indent__c];
List<Indent_line_item__c> opplines=[select id, Quantity__c,Product__c
from Indent_line_item__c where Id=:oppId.id];

        for(Indent_line_item__c oppline:opplines){
        
        Order_Line_item__c OrderLine = new Order_Line_item__c();
        OrderLine.Product__c = oppline.Product__c;
        OrderLine.Quandity__c = oppline.Quantity__c;
        OrderLine.Unit_Price__c = oppline.Unit_Price__c;
        OrderLine.Total_Price__c = oppline.Total_Price__c;
        insert OrderLine;
    }

}

 
Hi every one,

I written one formula for displaying images for different condition.

IF( Total_Lead_Score__c<20, IMAGE('/resource/1502342615000/Star1', 'Star1'),
IF( Total_Lead_Score__c<40, IMAGE('/resource/1502342589000/Star2', 'Star2'),
IF( Total_Lead_Score__c<60, IMAGE('/resource/1502342560000/Star3', 'Star3'),
IF( Total_Lead_Score__c<60, IMAGE('/resource/1502311560000/Star3', 'Star4'),
IMAGE('/resource/1502342499000/Star5','Star5')))))


This produces a Compiled formula too big error

CASE( Total_Lead_Score__c ,
Total_Lead_Score__c<20,IMAGE("/resource/1502342615000/Star1"),
Total_Lead_Score__c<40,IMAGE("/resource/1502342589000/Star2"),
Total_Lead_Score__c<40,IMAGE("/resource/1502377589000/Star3"),
Total_Lead_Score__c<40,IMAGE("/resource/15023222000/Star4"),
IMAGE("/resource/1502342560000/Star5")
)

Error: Incorrect number of parameters for function 'IMAGE()'. Expected 2, received 1
 
Hi everyone,
How to deploy application from production to sand box.
please tell me.
Hi everyone,
         
I have two objects Expense and Travel request and both are related by a lookup.
1.Travel Request has two fields like Travel_Purpose__c(Text Field) and Client_Visit__c(Look Up With Account).
2.Expense has two fields like Travel_Request__c(Look Up with Travel Request ) and Claim_Purpose__c(Text)
3.Now when i select Travel_Request__c then Claim_Purpose__c automatically in the same Editable page update like
              If(Travel_Request__c != Null)     
                    {
                         (Claim_Purpose__c= Travel_Purpose__c+Clent_Visit__c)
                     }

 
Hi Every one,
I want to write a trigger to update record for unrelated object. So that i written one trigger it showing error can any one help me out.

trigger populateExpenseFromUser on Expense__c (before insert , before update)
{
    
    Set<ID> setExpIds = new Set<ID>();
    for(Expense__c exp : trigger.new){
        if(exp.Claim_Purpose__c!= null)
        setExpIds.add(exp.Claim_Purpose__c);
    }
    
     MAP<ID , User> mapExp = new MAP<ID , User>([Select Id,Branch__c,Department__c,Designation__c from user where id in: setExpIds]);
     for(Expense__c exp : trigger.new)
       {
        if(exp.Claim_Purpose__c != null)
          {
            User tr = mapExp.get(exp.Claim_Purpose__c);
            exp.Branch__c= tr.Branch__c;
            exp.Department__c= tr.Department__c;
            exp.Designation__c=tr.Designation__c;
          //  update exp;
            
          }
       
       }