• Sekhar Sekhar
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies
Hi
In my Account object has 2 record types 1) Customer 2) Vendor
Created one custom object(Trade Reference) with Account lookup and contact lookup and designed a custom form (vf page ) with Trade Reference fields
In that form When click on account look up field it display only Vender record type Records only it is done successfully
After when click on contact lookup it display only above selected account record related contacts only (i.e contacts should be under selected account related only ) it is done
Now my Requirement is
In account à Customer record type Record (not a vendor record) àdetail page has button (Application)
When click on Application button Form will be open (vf page) in that vf page account look up is displaying vendor records and contact also showing related account records
But when click on save button it display error message
  • Contact: Value does not exist or does not match filter criteria.
  • System.DmlException: Insert failed. First exception on row 0; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not match filter criteria.: [Contact__c]
Account lookup field (Company Name) filter condition
Filter Criteria         Company Name: Account Record Type: Name EQUALS Accounts - Vendor
Filter Type             Required. The user-entered value must match filter criteria.
Active                    True

Contact lookup field (Contact) filter condition
Filter Criteria          Trade References: Company Name ID EQUALS Contact: Account Name ID
Filter Type              Required. The user-entered value must match filter criteria.
Active                    True
 
Hi Friends
When i am click on custom button in CRM account then it is working fine
But when i am click on same custom buttons in Community Portal it showing a error message like
a problem with the onclick javascript for this button or link was encountered
{faultcode:'soapenv:Server',faultstring:'Page not allowed for the profile',}

my custom button code is

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
window.open("/apex/GenerateInvoice?id={! Work_Order__c.Id }",'_blank');
var oppty= '{!Work_Order__c.Id }';
var result = sforce.apex.execute('Generateinvoice' ,'FieldServieRates',{opptyId:oppty});
 
Here my Class(Generateinvoice) is global and Method(FieldServieRates) is webservices

User-added image

Thank You
Hi  
In my vf page display all account records  along with check box
User-added image
When i am select accounts records (click on show selected records button) it display contact object fields under account record  it is doneUser-added image
After fill the details click on save button
Here my problem is contact records are saved success fully. but all contact records are saved with same name
How to solve this problem
User-added image
Here i am providing my class and vf page code
class
public class Demowrapperclass4
{
    public list<Account> selectedrecords {get;set;}
    public list<wrapperclass> wrapperlist123 { get; set; }
    public contact con{set;get;}
    public list<contact> conlist{set;get;}
  
    
       
    public Demowrapperclass4(ApexPages.StandardController controller) // main class constructor
    {
       wrapperlist123 =new list<wrapperclass>();
       
       con=new contact();
       conlist=new list<contact>();
      
       for(account a : [select id,industry,name,phone from Account])
        {
             wrapperlist123.add(new wrapperclass(a));
        }
     }
    
    //method for getting selected records
     public PageReference getSelected()
     {
         selectedrecords=new list<Account>();
         for(wrapperclass wlist:wrapperlist123)
         {
             if(wlist.chboo==true)
             {
                 selectedrecords.add(wlist.acc);
                 
             }
         }
         
         return null;
     }
     
     //method for save the contact records
     public void savecontact()
     {    
          
                
          for(account a: selectedrecords)
          {
              
                  contact con2=new contact(); 

                  con2.Accountid=a.id;
                  con2.lastname=con.lastname;
                  con2.phone=con.phone;
      
                  conlist.add(con2);
          }
        
          insert conlist; 
          
          
     }
    
    //Wrapper class
    public class wrapperclass
    {
        public  Account acc  {set;get;}
        public boolean chboo {set;get;}
        public wrapperclass(Account acc)// wrapper class constructor
        {
            this.acc=acc;
            chboo=false;
        
        }
       
    }

}



vf page

<apex:page standardController="WrapperClass4__c" extensions="Demowrapperclass4" sidebar="false"> <apex:form > <apex:pageBlock mode="edit"> <apex:commandButton value="Show Selected Records" action="{!getSelected}" /> <apex:pageBlockSection > <apex:pageblockSection title="All Account Records" > <apex:pageBlockTable value="{!wrapperlist123}" var="wl"> <apex:column > <apex:inputCheckbox value="{!wl.chboo}"/> </apex:column> <apex:column value="{!wl.acc.name}"/> <apex:column value="{!wl.acc.phone}"/> <apex:column value="{!wl.acc.industry}"/> <apex:column breakBefore="true"> <apex:pageBlockSection rendered="{!wl.chboo==true}" ondblclick="{!wl.chboo==true}"> <apex:inputField value="{!con.lastname}" /> <apex:inputField value="{!con.phone}"/> </apex:pageBlockSection> </apex:column> </apex:pageBlockTable> </apex:pageblockSection> <apex:pageBlockSection title="Selected Account Records" > <apex:pageBlockTable value="{!selectedrecords}" var="s"> <apex:column > <apex:facet name="header"> Account Name</apex:facet> <apex:outputField value="{!s.name}"/> </apex:column> <apex:column > <apex:facet name="header"> Account Phone</apex:facet> <apex:outputField value="{!s.phone}"/> </apex:column> <apex:column > <apex:facet name="header"> Account Industry</apex:facet> <apex:outputField value="{!s.industry}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> </apex:pageBlockSection> </apex:pageBlock> <apex:commandButton value="Save" action="{!savecontact}"/> </apex:form> </apex:page>

 
Hi
I created a form in vf page in that  text field is adjusted to left side and that field is required
When i click on Submit button in that vf page it display error message at some  distance of that field
(Generally error message should be displayed under  the  field  )  
User-added image
Hi
In my organization lead object Country and Street standard text fields are converted into standard pick list this is done successfully
My problem is when I am call these standard pick list fields (Country and Street) in visual force page
I did not get pick list field in vf page (I get Country and Street fields as a text fields)
How to get  Country and Street fields as a pick list fields

 
Hi  Friends
I have a small doubt that is what is the use of “ id” in visual force pages and how to use ,when to use these “id ” in vf page
Ex:1  <apex:pageBlock id="theBlock">
Ex:2  <apex:pageBlockSection title="Information" id="et">

 
HI 
In my vf page i am displating all account records (by using  <apex:pageBlockTable> ) it is done  here my problem is 
when i am click on account name ( any one from displayed account names) then immediately display one popup in that popup should display that account name  record details 
 
 
HI 
I am new to sales force  in my organisation requirement  is 
" create web to case form in that form 3 field dependencies pick list  are present here i am not get  dependence(one pick list is not depend other one )"

Please provide sample code for field dependencies in web to case
Thank you.
 
Hi
In my Account object has 2 record types 1) Customer 2) Vendor
Created one custom object(Trade Reference) with Account lookup and contact lookup and designed a custom form (vf page ) with Trade Reference fields
In that form When click on account look up field it display only Vender record type Records only it is done successfully
After when click on contact lookup it display only above selected account record related contacts only (i.e contacts should be under selected account related only ) it is done
Now my Requirement is
In account à Customer record type Record (not a vendor record) àdetail page has button (Application)
When click on Application button Form will be open (vf page) in that vf page account look up is displaying vendor records and contact also showing related account records
But when click on save button it display error message
  • Contact: Value does not exist or does not match filter criteria.
  • System.DmlException: Insert failed. First exception on row 0; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not match filter criteria.: [Contact__c]
Account lookup field (Company Name) filter condition
Filter Criteria         Company Name: Account Record Type: Name EQUALS Accounts - Vendor
Filter Type             Required. The user-entered value must match filter criteria.
Active                    True

Contact lookup field (Contact) filter condition
Filter Criteria          Trade References: Company Name ID EQUALS Contact: Account Name ID
Filter Type              Required. The user-entered value must match filter criteria.
Active                    True
 
Hi Friends
When i am click on custom button in CRM account then it is working fine
But when i am click on same custom buttons in Community Portal it showing a error message like
a problem with the onclick javascript for this button or link was encountered
{faultcode:'soapenv:Server',faultstring:'Page not allowed for the profile',}

my custom button code is

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
window.open("/apex/GenerateInvoice?id={! Work_Order__c.Id }",'_blank');
var oppty= '{!Work_Order__c.Id }';
var result = sforce.apex.execute('Generateinvoice' ,'FieldServieRates',{opptyId:oppty});
 
Here my Class(Generateinvoice) is global and Method(FieldServieRates) is webservices

User-added image

Thank You
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 
In my vf page i am displating all account records (by using  <apex:pageBlockTable> ) it is done  here my problem is 
when i am click on account name ( any one from displayed account names) then immediately display one popup in that popup should display that account name  record details 
 
 
here my class is

               case cse=[select id,ContactEmail,Contactid,Email__c,CaseNumber from case where id=:caseid];
               
               Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); 
               mail.setTargetObjectId(cse.Contactid);
              
               mail.setSubject('New Case created ');  
               body = cs.Email__c;
               
               mail.setHtmlBody(body);
               mail.setSaveAsActivity(true);
               Messaging.SendEmailResult[] result = Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail}); 
               
     
Here activity History is stored in contact detail page related list 
But  that is not my  Requirement  
i want store Activity history in case dateil page related list