• mbforce
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 18
    Replies

Hi All,

In pageBlockTable I want to add few fields from Account and few fields from Contact I have used Account as a standard controller how to give the column values for pageblocktable,please let me know if extension will be required.?

 

In table I want columns for Account Name & Billing address from account object and Name & Email id from Contact object. which are associated with that account.

what will be Value and Var details in PageBlockTable, if possible please provide me some example.

 

Thanks,

Manish.

Hi,

In pageBlockTable I want to add few fields from Account and few fields from Contact I have used Account as a standard controller how to give the column values for pageblocktable

 

in table I want columns for Account Name, Billing address from account object and Name and Email id from Contact object.,

what will be Value and Var details in PageBlockTable, if possible please provide me some example.

 

Thanks,

Manish.

 

  

Need help in writing Trigger
 
want to write trigger on Contact Object
 
created checkbox field on contact object with name Technical_employee
 
created number field on Account object with name Total_Technical_Employee
 
Total_Technical_Employee field should contain count of records from contact object whose Technical_employee checkbox is checked, how to write (insert, update, delete) trigger for this.

 

Thanks,

Manish

Dear all,

 

I have 2 object Course and Student... i want to find the details of the student based on their course start date ,

 

I have written following dynamic query but its giving error for date field. please help

 

DateTime dt = System.Now();
String strStartDate = dt.format('yyyy-MM-dd\'T\'HH:mm:ss\'Z\'');

String qryString = 'Select Studentname__c, Id__c, start_date__c from course__c Course_Name__c != null';

if (!strStudentName.equals(''))
qrystring += ' and Studentname__c LIKE \''+String.escapeSingleQuotes(strStudentName) +'%\'';
if (!strStartDate.equals(''))
qrystring += ' and Start_Date__c = \''+String.escapeSingleQuotes(strStartDate) +'\'';
results = Database.query(qryString);

return null;

}


Getting error.......
System.QueryException: value of filter criterion for field 'Start_Date__c' must be of type date and should not be enclosed in quotes
please let me know how to resolv it

I have created 2 object Student and Course with following fields
 
Student - Student Name, address, DOB, Phone Number, Course joined
Course - Course Name, Start Date , end date, Fees,
 
also created a VisualForce page with four input textbox (Student Name, Course, Start date, End Date)
 
user will enter value in some or all of these boxes and click search button on VF page I want to construct Query which will retrieve data from Student and Course object based on user input

e.g. if user input Student Name as John and Course as SFDC and click search button, query should retrieve details (Student Name, course Name, start date , end date, fees) of all the student with name john and enrolled fo course SFDC
 
Note: Object Student and Object Cource have many to many relationship
I have referred following link but couldnt construct query
 
please help in constructing query / provide syntax of the query.
 
Thanks,
Manish B.

Dear all,

 

I am trying to pass visualforce report data to excel file .I have given page section as below

 

<apex:page sidebar="false" showHeader="false" contentType="application/vnd.ms-excel#Report.xls" cache="true" Controller="Thecontroller">

 

and corrosponding apex class

 

public pagereference FetchExcelReport()
    {
    Pagereference Reportpage = new PageReference('/apex/ExcelReport');
    Return Reportpage;
    }

 

whenever I am trying to save the code (with ctrl+s) on page editor its asking for saving report.xls file, and that file is containing textbox, picklist, and other fields from visualforce pages. while I want only report rows to be saved in excel and only when I click a export button on report page.

 

please suggest.

 

Thanks,

Manish.

 

 

Hi All,

 

I am in learning phase of Visualforce and Apex, I have created 2 object Student and Course with following fields

 

Student - Student Name, address, DOB, Phone Number, Course joined

Course - Course Name, Start Date , end date, Fees,

 

I have created a VF page with four textbox (Student Name, Course, Start date, End Date)

 

user will enter value in any of these boxes and click search button on VF page I want to construct Query based on user input

e.g. if user input Student Name as John and Course as SFDC and click search button, query should retrieve details (Student Name, course Name, start date , end date, fees) of all the student with name john and enrolled fo course SFDC

 

Note: Object Student and Object Cource have many to many relationship   

 

Please help,

 

Thanks,

Manish

Dear all,

Please help with the following

I am new to visualforce and Apex, need help in creating Apex controller for search button for following

 

I have created two object "Student" with fields (Name, Date of birth, Email, Phone, Course enrolled) and object "Course" with fields (Course Name, Fees, Intake, Start Date)

I have created a VF page where I will give course name and search and display students details who have enrolled for the course

 

created the simple VF page with following code, need Apex controller code for searching and displaying students details enrolled for that course.

 

<apex:page sidebar="false" showHeader="false" Controller="institutectrl">
      <apex:form >
                <apex:pageBlock title="My Content" mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton value="Search"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="List of Students enrolled for a Course" columns="5">
               <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Course Name"/>
                    <apex:inputText id="account__name"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>  
    </apex:form>
 </apex:page>

 

 

Thanks,

Manish B. 

Hi,

 

I am new to visualforce and Apex, need help in creating controller for search button for following

 

I have created two object Student with fields (Name, Date of birth, Email, Phone, Course enrolled) and object Cource with fields (Course Name, Fees, Intake, Start Date)

 

I have created a VF page where I will give course name and search for student details who have enrolled for the cource

 

created the simple VF page with following code, need controller code for searching and displaying students details enrolled for that course.

 

<apex:page sidebar="false" showHeader="false" Controller="studentctrl">
    <apex:form >
        <apex:pageBlock title="Student Search">
            <apex:pageBlockSection title="List of Students Enrolled"></apex:pageBlockSection>
            <apex:pageBlockButtons >
            <apex:outputLabel Value="Course Name: ">  </apex:outputLabel>
              <apex:inputText id="txtcoursename"/>
                <apex:commandButton value="Search"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection >

            </apex:pageBlockSection>
        </apex:pageBlock>
   
    </apex:form>
</apex:page> 

 

Also suggest modification required in VF page code for assigning action to search button..

 

Thanks,

Manish. 

Hi,

I am very new to salesforce.

I am creating a sample application where I have created 2 objects namely "Student" and "Course"

 

Student object has fields ( name, date of birth, address, course enrolled, start date)

Course object has fields (Course name, start date , end date, Intake )

 

I want to add a field in Course object for available seat which will get automatically updated (intake - number of enrollments) for any particular course.

If there are 3 course "A" , "B" and "C" with intake 20, 25 and 30, how to check available seat for any particular course.

 

Please provide solution in detail.

 

Thanks,

Manish

Hi,

 

Can we edit custom object permission in "Standard platform user"  profile, if yes how?

 

Note: I have logged in as admin.

 

Thanks,

Manish.

Hi,

 

I am very much new to the salesforce

 

I am creating recruiting app using a following book

http://www.salesforce.com/us/developer/docs/fundamentals/salesforce_creating_on_demand_apps.pdf

 

in its security and sharing data section I have created a user Phil Katz, and trying to make this as a DBA owner as per the steps given in the book but I am getting error saying

 

Transfer Requires Read The new owner must have "Read" permissions on this type of record.

Click hereto return to the previous page.

 

how to get it resolved, how to provide read access to this new user.

 

please suggest

 

Thanks,

Manish.

I have created 2 object Student and Course with following fields
 
Student - Student Name, address, DOB, Phone Number, Course joined
Course - Course Name, Start Date , end date, Fees,
 
also created a VisualForce page with four input textbox (Student Name, Course, Start date, End Date)
 
user will enter value in some or all of these boxes and click search button on VF page I want to construct Query which will retrieve data from Student and Course object based on user input

e.g. if user input Student Name as John and Course as SFDC and click search button, query should retrieve details (Student Name, course Name, start date , end date, fees) of all the student with name john and enrolled fo course SFDC
 
Note: Object Student and Object Cource have many to many relationship
I have referred following link but couldnt construct query
 
please help in constructing query / provide syntax of the query.
 
Thanks,
Manish B.
Through apex call out i am getting following response from .Net Webservice  . How I will render/create as attachment  in salesforce as well formed PDF file based on below response.

JVBERi0xLjQNCiVET0MxIFJlc291cmNlR1VJRD01ODU4REFCNUQzQUY0RjY2QjU2Mzc5Mzg5NjI0NDYxMg0KJeLj5A0KMSAwIG9iag0KPDwgL1R5cGUgL1BhZ2UNCi9QYXJlbnQgMyAwIFINCi9SZXNvdXJjZXMgNCAw........

Please help . 

Hi All,

In pageBlockTable I want to add few fields from Account and few fields from Contact I have used Account as a standard controller how to give the column values for pageblocktable,please let me know if extension will be required.?

 

In table I want columns for Account Name & Billing address from account object and Name & Email id from Contact object. which are associated with that account.

what will be Value and Var details in PageBlockTable, if possible please provide me some example.

 

Thanks,

Manish.

Hi,

In pageBlockTable I want to add few fields from Account and few fields from Contact I have used Account as a standard controller how to give the column values for pageblocktable

 

in table I want columns for Account Name, Billing address from account object and Name and Email id from Contact object.,

what will be Value and Var details in PageBlockTable, if possible please provide me some example.

 

Thanks,

Manish.

 

  

Need help in writing Trigger
 
want to write trigger on Contact Object
 
created checkbox field on contact object with name Technical_employee
 
created number field on Account object with name Total_Technical_Employee
 
Total_Technical_Employee field should contain count of records from contact object whose Technical_employee checkbox is checked, how to write (insert, update, delete) trigger for this.

 

Thanks,

Manish

Dear all,

 

I have 2 object Course and Student... i want to find the details of the student based on their course start date ,

 

I have written following dynamic query but its giving error for date field. please help

 

DateTime dt = System.Now();
String strStartDate = dt.format('yyyy-MM-dd\'T\'HH:mm:ss\'Z\'');

String qryString = 'Select Studentname__c, Id__c, start_date__c from course__c Course_Name__c != null';

if (!strStudentName.equals(''))
qrystring += ' and Studentname__c LIKE \''+String.escapeSingleQuotes(strStudentName) +'%\'';
if (!strStartDate.equals(''))
qrystring += ' and Start_Date__c = \''+String.escapeSingleQuotes(strStartDate) +'\'';
results = Database.query(qryString);

return null;

}


Getting error.......
System.QueryException: value of filter criterion for field 'Start_Date__c' must be of type date and should not be enclosed in quotes
please let me know how to resolv it

Dear all,

 

I am trying to pass visualforce report data to excel file .I have given page section as below

 

<apex:page sidebar="false" showHeader="false" contentType="application/vnd.ms-excel#Report.xls" cache="true" Controller="Thecontroller">

 

and corrosponding apex class

 

public pagereference FetchExcelReport()
    {
    Pagereference Reportpage = new PageReference('/apex/ExcelReport');
    Return Reportpage;
    }

 

whenever I am trying to save the code (with ctrl+s) on page editor its asking for saving report.xls file, and that file is containing textbox, picklist, and other fields from visualforce pages. while I want only report rows to be saved in excel and only when I click a export button on report page.

 

please suggest.

 

Thanks,

Manish.

 

 

Dear all,

Please help with the following

I am new to visualforce and Apex, need help in creating Apex controller for search button for following

 

I have created two object "Student" with fields (Name, Date of birth, Email, Phone, Course enrolled) and object "Course" with fields (Course Name, Fees, Intake, Start Date)

I have created a VF page where I will give course name and search and display students details who have enrolled for the course

 

created the simple VF page with following code, need Apex controller code for searching and displaying students details enrolled for that course.

 

<apex:page sidebar="false" showHeader="false" Controller="institutectrl">
      <apex:form >
                <apex:pageBlock title="My Content" mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton value="Search"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="List of Students enrolled for a Course" columns="5">
               <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Course Name"/>
                    <apex:inputText id="account__name"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>  
    </apex:form>
 </apex:page>

 

 

Thanks,

Manish B. 

Hi,

 

I am new to visualforce and Apex, need help in creating controller for search button for following

 

I have created two object Student with fields (Name, Date of birth, Email, Phone, Course enrolled) and object Cource with fields (Course Name, Fees, Intake, Start Date)

 

I have created a VF page where I will give course name and search for student details who have enrolled for the cource

 

created the simple VF page with following code, need controller code for searching and displaying students details enrolled for that course.

 

<apex:page sidebar="false" showHeader="false" Controller="studentctrl">
    <apex:form >
        <apex:pageBlock title="Student Search">
            <apex:pageBlockSection title="List of Students Enrolled"></apex:pageBlockSection>
            <apex:pageBlockButtons >
            <apex:outputLabel Value="Course Name: ">  </apex:outputLabel>
              <apex:inputText id="txtcoursename"/>
                <apex:commandButton value="Search"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection >

            </apex:pageBlockSection>
        </apex:pageBlock>
   
    </apex:form>
</apex:page> 

 

Also suggest modification required in VF page code for assigning action to search button..

 

Thanks,

Manish. 

Hi,

I am very new to salesforce.

I am creating a sample application where I have created 2 objects namely "Student" and "Course"

 

Student object has fields ( name, date of birth, address, course enrolled, start date)

Course object has fields (Course name, start date , end date, Intake )

 

I want to add a field in Course object for available seat which will get automatically updated (intake - number of enrollments) for any particular course.

If there are 3 course "A" , "B" and "C" with intake 20, 25 and 30, how to check available seat for any particular course.

 

Please provide solution in detail.

 

Thanks,

Manish

Hi,

 

I am very much new to the salesforce

 

I am creating recruiting app using a following book

http://www.salesforce.com/us/developer/docs/fundamentals/salesforce_creating_on_demand_apps.pdf

 

in its security and sharing data section I have created a user Phil Katz, and trying to make this as a DBA owner as per the steps given in the book but I am getting error saying

 

Transfer Requires Read The new owner must have "Read" permissions on this type of record.

Click hereto return to the previous page.

 

how to get it resolved, how to provide read access to this new user.

 

please suggest

 

Thanks,

Manish.

Hi All,

I'm working with the task related to closing tabs in service cloud console.
I handle actions when user close window or browser tab using this part of code:

 

<script type="text/javascript">
	var validNavigation = false;
 
        function wireUpEvents() {
        
        //get current url
        var linkUrl = window.location.href;

         var dont_confirm_leave = 1; //set dont_confirm_leave to 1 when you want the user to be able to leave withou confirmation
          var leave_message = 'You sure you want to leave page: '+ linkUrl +'?'
          function goodbye(e) {
          //alert(linkUrl);
            if (!validNavigation) {
              if (dont_confirm_leave!==0) {
                if(!e) e = window.event;
                //e.cancelBubble is supported by IE - this will kill the bubbling process.
                e.cancelBubble = true;
                e.returnValue = leave_message;
                //e.stopPropagation works in Firefox.
                if (e.stopPropagation) {
                  e.stopPropagation();
                  e.preventDefault();
                }
                //return works for Chrome and Safari
                return leave_message;
              }
            }
          }
          window.onbeforeunload=goodbye;
         
          // Attach the event keypress to exclude the F5 refresh
          jQuery(document).bind('keypress', function(e) {
            if (e.keyCode == 116){
              validNavigation = true;
            }
          });
         
          // Attach the event click for all links in the page
          jQuery("a").bind("click", function() {
            validNavigation = true;
          });
         
          // Attach the event submit for all forms in the page
          jQuery("form").bind("submit", function() {
            validNavigation = true;
          });
         
          // Attach the event click for all inputs in the page
          jQuery("input[type=submit]").bind("click", function() {
            validNavigation = true;
          });
         
        }
         
        // Wire up the events as soon as the DOM tree is ready
        jQuery(document).ready(function() {
          wireUpEvents();
        });
	 </script>  

 

But I have problems with closing tabs in service console. Any ideas how I can handle this?

 

Regards,

Lukasz

 

 

[EDIT]

We can do this invoking Service Cloud Console Method:

function tabUnsavedJS(){
           sforce.console.setTabUnsavedChanges(true, displayResult);
      }

 function displayResult(result) {
             if (result.success) {
                 alert('Tab status has been successfully updated');
             } else {
                 alert('Tab status couldn’t be updated');
             }
      }

 After this Salesforce will show warning message when user will close concole tab,