Saturday 31 May 2014

Adding summary field as footer of pageblock table in vf page.





Hi All,

This post is simply showing how can we add the summary field or total amount or other information in footer of PageBlockTable or DataTable in vf page.

Here, in the following example I am showing sum of all the opportunity line items in footer of PageBlockTable,

i am using the <apex:facet name="footer"> tag to show the value in the footer.

Here the code:


Screen shot:

Thanks
Anurag Jain



Wednesday 7 May 2014

Insert Records in SF by using JavaScript without Apex classes or controller.





Hi guys,

In this post i am showing how can we use the power of javascript in VF page and inserting record in salesforce without any standard/custom controller or Apex.

By using AJAX Toolkit we can do this task easily.

AJAX Toolkit divides in two type synchronous and asynchronous call.

It works in three simple steps:
  1. Connecting to the AJAX Toolkit(By using login methods or getting Session_ID)
  2. Embedding the API methods in JavaScript.
  3. Processing the results.
in following example i am using synchronous call :-


Screen Shoots:-


 After inserting of record you are having ID of record :-


Happy Coding...:)

Thanks
Anurag Jain