• Santi Ram Rai
  • NEWBIE
  • 115 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 62
    Replies
Hi everybody,

How to delete Org account? Becaue i have created wrong ediction.
Why Visualforce pages are not showing on Mobile?
Hi every body,

I have followed this steps "https://developer.salesforce.com/page/Force.com_IDE_Installation" to intalled the Eclipes and create project, but i got htis error. Why?

Here is error screenshot:
User-added image
Hi Everybody,

I have build an app. Now i have problem, and below are the my problem:

i) How we can transfer the app to another org or to another account?
ii) And how to install the app on ApexExchange platform?

Please can some body help me to solve them.
Hi every body.
This is my System.Schedule method:
updateStatus_interface obj = new updateStatus_interface();
String sch = '0 0 8 * * ?';
System.schedule('New', sch, obj);

Which can Scheduled Next Scheduled Run as this:
User-added image

Now, my question is how to Schedule, which can run every 10 or 12 or 30 minutes?
Hi everybody,

i) I have custom Objests: (Project, Project Task)
ii) They have lookup relationship.[Project can have many Project Tasks]

So, i have custom field called Status Type PickList(Active,Inactive,Closed) in Object Project.
Now, my Logic is: When the Project Task is created under Project the Status should change to Active.

Do some one has idea?
Hi everybody,

i) I have custom Objests: (Project, Project Task)
ii) They have lookup relationship.[Project can have many Project Tasks]

So, i have custom field called Status Type PickList(Active,Inactive,Closed) in Object Project.
Now, my Logic is: When the Project Task is created under Project the Status should change to Active.

This is my Trigger:
trigger StatusActive on Project__c (after insert) {

   for (Project__c fc: Trigger.new) {
        if(fc.Project__c.Project_Task_Name__c != "") 
            fc.Status__c = 'Active';
    }
}

But i have this error:
User-added image
Hi everybody,

My intension is; by befultls select the "Inactive" value from picklis.

Here is my code:
trigger UpdateStatus on Project__c (before insert) {
   for (Project__c fc: Trigger.new) {
        if(fc.Project__c=true ) 
         Project__c.Status__c = 'Inactive';
    }
  }

But, i have thiss error:
User-added image
 
Hi every body,

Can we implemented this Add Pagination to the List, to custon custom object. I tried but i am getting this types error;
"Unknown property 'Project_Task__cStandardController.PageNumber'
"Unknown property 'Project_Task__cStandardController.Previous'. Please can you help me with this error message?
 
<apex:page standardController="Contact" recordSetVar="contacts" showHeader="false">
    <apex:form >
        <apex:pageBlock title="Contacts List" id="contacts_list">
            Filter  : 
            <apex:selectList value="{! filterId }" size="1">
                <apex:selectOptions value="{! listViewOptions }"/>
                <apex:actionSupport event="onchange" reRender="contacts_list"/>
            </apex:selectList>
            <!-- Contacts List -->
            <apex:pageBlockTable value="{! contacts }" var="ct">
                <apex:column value="{! ct.FirstName }"/>
                <apex:column value="{! ct.LastName }"/>
                <apex:column value="{! ct.Email }"/>
                <apex:column value="{! ct.Account.Name }"/>
            </apex:pageBlockTable>
            <!--Add Pagination to the List-->
            <table style="width: 100%">
                <tr>
                    <td>
                        <!-- Page X of Y -->
                        Page: <apex:outputText value=" {!PageNumber} of {! CEILING(ResultSize / PageSize) }"/>
                    </td>            
                    <td align="center">
                        <!-- Previous page -->
                        <!-- Next page -->
                <!-- active -->
                <apex:commandLink action="{! Previous }" value="« Previous"
                     rendered="{! HasPrevious }"/>
                <!-- inactive (no earlier pages) -->
                <apex:outputText style="color: #ccc;" value="« Previous"
                     rendered="{! NOT(HasPrevious) }"/>
                &nbsp;&nbsp;  
                <!-- Next page -->
                <!-- active -->
                <apex:commandLink action="{! Next }" value="Next »"
                     rendered="{! HasNext }"/>
                <!-- inactive (no more pages) -->
                <apex:outputText style="color: #ccc;" value="Next »"
                     rendered="{! NOT(HasNext) }"/> 
                    </td>
                    <td align="right">
                        <!-- Records per page -->
                        Records per page :
                        <apex:selectList value="{! PageSize }" size="1">
                            <apex:selectOption itemValue="5" itemLabel="5"/>
                            <apex:selectOption itemValue="10" itemLabel="10"/>
                            <apex:selectOption itemValue="15" itemLabel="15"/>
                            <apex:selectOption itemValue="20" itemLabel="20"/>
                            <apex:actionSupport event="onchange" reRender="contacts_list"/>
                        </apex:selectList>  
                    </td>
                </tr>
            </table>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 
Hi every body,

I have crated custom object called Project, and it has fields like; Project Name, Start Date, End Date. So, my question is, how to implemented functionality whether project is  active, iactive or closed.
 Hi eveybody,

This is my Property in the apex class, which get the RecordType from the object. But it doesn`t work. Why? Please can you help me to fix it?
public List<String> ProjectRecordType{
    get {
        if (ProjectRecordType == null) {
    ProjectRecordType = new List<String>();
        Schema.DescribeFieldResult field = Project_Task__c.RecordType.Name.getDescribe();

         for (Schema.RecordTypeInfo rt: field.getType())
         ProjectRecordType.add(rt.getLabel());

        }
        return ProjectRecordType;          
    }
    set;
  }
}

 
Hi every body,

I want to display Record Type in Visualforce page. But how, i tried this but it doen`t work.
User-added image

My Code:
<apex:page standardController="Project_Task__c" extensions="projectTaskController" action="{!runSearch}" showHeader="false" standardStylesheets="true" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" >
  <apex:form >
  <apex:pageMessages id="errors" />
  <apex:pageBlock title="Find Project Task" mode="edit">
  <apex:pageBlockButtons location="top">
    <apex:commandButton value="New Project Task " action="{!create}"/>
  </apex:pageBlockButtons>
  <table width="100%" border="0">
  <tr>  
    <td width="200" valign="top">
      <apex:pageBlock title="Parameters" mode="edit" id="criteria">
      <script type="text/javascript">
          function doSearch() {
            searchServer(
              document.getElementById("ProjectTaskName").value,
              document.getElementById("LeaveType").options[document.getElementById("LeaveType").selectedIndex].value);
          }
      </script> 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
           <apex:param name="ProjectTaskName" value="" />
           <apex:param name="LeaveType" value="" />
      </apex:actionFunction>
      <table cellpadding="2" cellspacing="2">
       <tr>
       <td style="font-weight:bold;">Project Task Name<br/>
        <input type="text" id="ProjectTaskName" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Leave Type<br/>
          <select id="LeaveType" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!LeaveType}" var="tech">
              <option value="{!tech}">{!tech}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      </table>
      </apex:pageBlock>
    </td>
    <td valign="top">
    <apex:pageBlock mode="edit" id="results">
        <apex:pageBlockTable value="{!projectTask}" var="pt">
		<apex:column headerValue="Action" style="float:right;width:90%">
            <apex:outputLink style="Color:blue" value="{!URLFOR($Action.Project_Task__c.Edit,pt.Id)}"> 
                Edit 
            </apex:outputLink>     
         </apex:column> 
                  <!--<apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Code" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!pt.Name}"/>
            </apex:column>-->
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Project Task Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Project Name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!pt.Project_Task_Name__c}"/>
            </apex:column>
             <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Project Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Project Name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!pt.pro_has_many_protask__c}"/>
            </apex:column>
             <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Leave Type" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Leave Type" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!pt.Leave_Type__c}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Reccord Type" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Reccord Type" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!pt.RedordType}"/>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>
    </td>
  </tr>
  </table>
  </apex:pageBlock>
  </apex:form>
</apex:page>


 
Hi everybody,

I want display the data from standardController, but i have this error "Unknown property 'Employee__cStandardController.employees'"

Screen Shoot:
User-added image

Visualforce page:
<apex:page standardController="Employee__c" extensions="loadPageProController" showHeader="false"  sidebar="false"  action="{!runSearch}" >
    <apex:form >
      <apex:pageMessages id="errors"/>
        <apex:pageBlock title="All Projects Detail" mode="edit">
            <table width="100%" border="0">
                <tr>
                    <td width="200" valign="top">
                        <apex:pageBlock title="Parameters" mode="edit" id="criteria">
                        <script type="text/javascript">
                          function doSearch() {
                            searchServer(
                              document.getElementById("Name").value
                       		);
	                        }
                        </script>
                            <!--Search Function-picklist-->
                            <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
                                <apex:param name="Name" value=""/>
      						</apex:actionFunction>
                            <table cellpadding="2" cellspacing="2">
                              <tr>
                               <td style="font-weight:bold;">Project Name<br/>
                                <input type="text" id="Name" onkeyup="doSearch();"/>
                                </td>
                              </tr>
                              </table>
      				</apex:pageBlock>
    			</td>
    		<td valign="top">
            <apex:pageBlock mode="edit" id="results">
                <apex:pageBlockTable value="{!employees}" var="employee">
                <apex:column headerValue="Action" style="float:right;width:90%"  > 
                    <apex:outputLink style="Color:blue" value="{!URLFOR($Action.Employee__c.Edit,employee.Id)}"> Edit </apex:outputLink>          
                </apex:column>
                    <apex:column >
                        <apex:facet name="header">
                            <apex:commandLink value="Employee Name" action="{!toggleSort}" rerender="results,debug">
                                <apex:param name="sortField" value="Employee Name" assignTo="{!sortField}"/>
                            </apex:commandLink>
                        </apex:facet>
                        <apex:outputField value="{!employees.Name}"/>
                    </apex:column>
               	 </apex:pageBlockTable>
            </apex:pageBlock>
         </td>
  		</tr>
  </table>
  </apex:pageBlock>
  </apex:form>
</apex:page>

Apex Class:
public class loadPageEmpController {
     public loadPageEmpController (ApexPages.StandardController controller) {
    }
    
    //The soql without the order and limit
    private String soql {get;set;}
  
  	//The collection of contacts to display
    public List<Employee__c>employees{get;set;}

   //The current sort direction. defaults to asc
    public String sortDir {
    get  { if (sortDir == null) {  sortDir = 'asc'; } return sortDir;}
    set;
    }

  	//The current field to sort by. defaults to  name
    public String sortField {
    get{ if (sortField == null) {sortField = 'Name'; } return sortField;}
    set;
    }

  	//Format the soql for display on the visualforce page
    public String debugSoql {
        get { return soql + ' order by ' + sortField + ' ' + sortDir; }
        set;
    }

  	//Init the controller and display some sample data when the page loads
  	public loadPageEmpController (){
 	     soql = 'select Name, account_has_many_emp__c, Last_Name__c,Phone__c,Date_Of_Birth__c from Employee__c where Name !=null';
 	     runQuery();
 	 }

  	//Toggles the sorting of query from asc<-->desc
    public void toggleSort() {
        // simply toggle the direction
        sortDir = sortDir.equals('asc') ? 'desc' : 'asc';
        // run the query again
        runQuery();
    }

  	//Runs the actual query
    public void runQuery(){
        try {
          employees= Database.query(soql + ' order by ' + sortField + ' ' + sortDir);
        }catch (Exception e) {
        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Ooops!'));
        }
    }
    
  	//Search by Project Types.
  	//Runs the search with parameters passed via Javascript
    public PageReference doSearch() {
        Id accId= Apexpages.currentPage().getParameters().get('Id');
        String Name= Apexpages.currentPage().getParameters().get('Name');
     
 	    soql = 'select Name, account_has_many_emp__c, Last_Name__c,Phone__c,Date_Of_Birth__c from Employee__c where Name !=null';
        if (Name!= null &&!Name.equals(''))
        soql += ' and Name LIKE \''+String.escapeSingleQuotes(Name)+'%\'';  
        
        // run the query again
        runQuery();
        return null;
    }
}


 
Hi everybody,

I want button on Visualforce page, which navigate to other visualforce page. Please, can some body has idea, how can i create it?

 
Hello Everybody,

Send an Email alert to the custom lookup fields (that refers to all contacts). Here is my code:
User-added image

But i am getting error:
User-added image
Hi every body,

I want to write a Trigger to send email to Manager, when the new project is created. So, how can i write it?
Hi every body,
I am creating a Validation Rules for Record Type and lookup. If the Record Type Field and Loopup field have same text, then process should pass, and if they have different text the process must give error message.

Here is image:
User-added image
Hi everybody.

I want to write a validation rules; my question is, if the Project Name (text filed) and  Project Type (picklist field) has same text then it should end the process, but if they are with different value; for example in Project Name is "Leave" and Project Type is "Holiday"  validation rules viges the error message. Please some one can help me to write this rules?

User-added image
Hello Everybody,
How to create Visualforve of Controller extension with Custom Controller not with StandardController.

Thanks.
Hi every body,
I have found this steps "http://www.valnavjo.com/blog/how-to-create-invoices-using-quote-templates/" on internet Quates printing invoices to PDF but, i am facing this error:

"No such column 'Invoice_number__c' on entity 'Quote'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

From where to get this "Invoice_number__c" unique name?
Hi every body,

I have followed this steps "https://developer.salesforce.com/page/Force.com_IDE_Installation" to intalled the Eclipes and create project, but i got htis error. Why?

Here is error screenshot:
User-added image
Hi Everybody,

I have build an app. Now i have problem, and below are the my problem:

i) How we can transfer the app to another org or to another account?
ii) And how to install the app on ApexExchange platform?

Please can some body help me to solve them.
Hi every body.
This is my System.Schedule method:
updateStatus_interface obj = new updateStatus_interface();
String sch = '0 0 8 * * ?';
System.schedule('New', sch, obj);

Which can Scheduled Next Scheduled Run as this:
User-added image

Now, my question is how to Schedule, which can run every 10 or 12 or 30 minutes?
Hi everybody,

i) I have custom Objests: (Project, Project Task)
ii) They have lookup relationship.[Project can have many Project Tasks]

So, i have custom field called Status Type PickList(Active,Inactive,Closed) in Object Project.
Now, my Logic is: When the Project Task is created under Project the Status should change to Active.

Do some one has idea?
Hi everybody,

i) I have custom Objests: (Project, Project Task)
ii) They have lookup relationship.[Project can have many Project Tasks]

So, i have custom field called Status Type PickList(Active,Inactive,Closed) in Object Project.
Now, my Logic is: When the Project Task is created under Project the Status should change to Active.

This is my Trigger:
trigger StatusActive on Project__c (after insert) {

   for (Project__c fc: Trigger.new) {
        if(fc.Project__c.Project_Task_Name__c != "") 
            fc.Status__c = 'Active';
    }
}

But i have this error:
User-added image