• Shantanu Mahajan
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 10
    Replies
Hello Everyone..
I want to lookup page into my site. how can i import it.!!!
Hello Everyone

I having a requirment like this..
When a Status of Task is change then the field of custom object also changes...

 
I am having requirment like 
I am using Pageblocktable in which i have some data and in one column i have given the link called view after clicking on view that particular detail should be viewd..
But it is not working correctly..
I am sharing my code with you

Visualforce
<apex:PageBlockSection columns="1" >
     <apex:pageBlockTable value="{!getc}" var="a">
         <apex:column value="{!a.Name}"/>
         <apex:column value="{!a.customer__c}"/>
         <apex:column value="{!a.E_mail__c}"/>
         <apex:column value="{!a.Phone_Number__c}"/>
         <apex:column headerValue="Action">
         <apex:commandLink value="view" reRender="imagepopup" action="{!addcomp}">
             <apex:param id="custid" value="{!a.id}"/>
         </apex:commandLink>
         </apex:column>
     </apex:pageBlockTable>
 </apex:PageBlockSection>

apex code
public Complaint__c add{get;set;}

public List<Shan__Complaint__c> getc{get;set;}

  public refreshctrl ()
    {
         
        
         getc= [Select id,Name,Shan__customer__c,Shan__E_mail__c,Shan__Phone_Number__c,Shan__Issue_Details__c,Shan__Issue_Summary__c from Shan__Complaint__c]; 
          
    }

public void addcomp()
    {
        ID fid=ApexPages.currentpage().getparameters().get('custid');
        add=[Select id,name,customer__c,E_mail__c,Phone_Number__c,Issue_Summary__c,Issue_Details__c from Complaint__c where id=:fid];
        displayPopUp=true;
       // return new Pagereference('/apex/viewcomp?id='+lid);
        
        
    
    }

It is giving me error:
Visualforce ErrorHelp for this Page
System.QueryException: List has no rows for assignment to SObject
Error is in expression '{!addcomp}' in page shan:cust_complaint: Class.Shan.refreshctrl.addcomp: line 37, column 1
Class.Shan.refreshctrl.addcomp: line 37, column 1     
 
in below code example i want to compare the e-mail and contact number of customer and complaint object. complaint and customer are in lookup relationship. i want output like if before registering a compliant it should check the same e-mail address and phone number must be in customer record.

trigger Demo on Complaint__c (before insert) {
    
    if(trigger.isBefore)
    {
        if(trigger.isInsert)
        {
            for(Shan__Complaint__c a:Trigger.new)
            {
                for(Shan__bsnl_customer__c b:Trigger.new)
                   if(a.Shan__Phone_Number_del__c== b.Shan__cust_contact__c && a.Shan__E_mail_del__c==b.Shan__cust_email__c)
                    {
                            a.adderror('Customer is not in Database');
                    
                    }
            }
        
        }
I am using Visualforce by using renderd as PDF with CSS code. But it shows me code CSS code in PDF. Actually i want to flip my text by 180 degree and i want this text at bottom of PDF page... 
Hello Everyone..
I want to lookup page into my site. how can i import it.!!!
Hello Everyone

I having a requirment like this..
When a Status of Task is change then the field of custom object also changes...

 
I am having requirment like 
I am using Pageblocktable in which i have some data and in one column i have given the link called view after clicking on view that particular detail should be viewd..
But it is not working correctly..
I am sharing my code with you

Visualforce
<apex:PageBlockSection columns="1" >
     <apex:pageBlockTable value="{!getc}" var="a">
         <apex:column value="{!a.Name}"/>
         <apex:column value="{!a.customer__c}"/>
         <apex:column value="{!a.E_mail__c}"/>
         <apex:column value="{!a.Phone_Number__c}"/>
         <apex:column headerValue="Action">
         <apex:commandLink value="view" reRender="imagepopup" action="{!addcomp}">
             <apex:param id="custid" value="{!a.id}"/>
         </apex:commandLink>
         </apex:column>
     </apex:pageBlockTable>
 </apex:PageBlockSection>

apex code
public Complaint__c add{get;set;}

public List<Shan__Complaint__c> getc{get;set;}

  public refreshctrl ()
    {
         
        
         getc= [Select id,Name,Shan__customer__c,Shan__E_mail__c,Shan__Phone_Number__c,Shan__Issue_Details__c,Shan__Issue_Summary__c from Shan__Complaint__c]; 
          
    }

public void addcomp()
    {
        ID fid=ApexPages.currentpage().getparameters().get('custid');
        add=[Select id,name,customer__c,E_mail__c,Phone_Number__c,Issue_Summary__c,Issue_Details__c from Complaint__c where id=:fid];
        displayPopUp=true;
       // return new Pagereference('/apex/viewcomp?id='+lid);
        
        
    
    }

It is giving me error:
Visualforce ErrorHelp for this Page
System.QueryException: List has no rows for assignment to SObject
Error is in expression '{!addcomp}' in page shan:cust_complaint: Class.Shan.refreshctrl.addcomp: line 37, column 1
Class.Shan.refreshctrl.addcomp: line 37, column 1     
 
in below code example i want to compare the e-mail and contact number of customer and complaint object. complaint and customer are in lookup relationship. i want output like if before registering a compliant it should check the same e-mail address and phone number must be in customer record.

trigger Demo on Complaint__c (before insert) {
    
    if(trigger.isBefore)
    {
        if(trigger.isInsert)
        {
            for(Shan__Complaint__c a:Trigger.new)
            {
                for(Shan__bsnl_customer__c b:Trigger.new)
                   if(a.Shan__Phone_Number_del__c== b.Shan__cust_contact__c && a.Shan__E_mail_del__c==b.Shan__cust_email__c)
                    {
                            a.adderror('Customer is not in Database');
                    
                    }
            }
        
        }