Results 1 to 3 of 3

Thread: How to validate subpanel quick create form with detailview

  1. #1
    deepakvishwakarma is offline Sugar Community Member
    Join Date
    Mar 2010
    Posts
    14

    Default How to validate subpanel quick create form with detailview

    Dear All,

    My problem is :- how can validate quick create form's field with same page of detailview's value, Exp:- Module-A is parent module and Module-B is child module and Module B is in subpanel of Module -A

    Module-A have a field like quantity and have value 10 for example , Module -B in subpanel of Module-A have other quantity's fields , then here i want validate this subpanel quantity field's value with DetailView (Module-A) quantity field's value

    Module-A have Qty= 10

    Module-B1 Qty=2
    Module-B2 Qty=2
    Module-B3 Qty=2
    Module-B4 Qty=2

    Subpanel value don't greater then his parent quantity's value

    here i'm using process_record logic hook but it fair after save and i want check it before save record


    Please help me

  2. #2
    ashdwi1's Avatar
    ashdwi1 is offline Sugar Community Member
    Join Date
    May 2008
    Location
    Noida
    Posts
    198

    Default Re: How to validate subpanel quick create form with detailview

    Hi,
    Here are the few steps you can try with.
    1. put an ajax call code at on click of save button of panel.
    2. during ajax call , put an action to calculate total amount from all relationships
    3. at success of ajax call put some another js code to check if returned value + current amount value in form is more than from current amout in parent , then make an alert and false to save action.

    Hope this should help to you.
    thanks
    Almost available at skype or gtalk at ashdwi1.

    SugarForge Project:
    http://www.sugarforge.org/projects/gmapdirection
    Email: ashdwi1@gmail.com
    Mob: +919005468298

    Hire us at Odesk at
    https://www.odesk.com/users/~~b9eff8ff219fd705

    Hire Us at Elance at:
    http://ashdwi1.elance.com

  3. #3
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: How to validate subpanel quick create form with detailview

    Just to complement to overwrite the save button onclick function you have two choices:
    1. On runtime find the save buttons (normally there is two one at the top and other below), and assign a new code to onclick function.
    2. You also could use customCode on quick create layout to already create the save button with your function.

    I also recomend you to first open your current form in a browser and copy the java script function called on save action, you will need to call that after your customized processing.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2011-07-28, 09:32 AM
  2. How to validate QuickCreate form in subpanel
    By karlee in forum Sugar Developer Website
    Replies: 3
    Last Post: 2009-06-16, 01:04 PM
  3. Replies: 1
    Last Post: 2007-09-03, 09:44 AM
  4. Replies: 3
    Last Post: 2007-06-13, 12:28 AM
  5. Replies: 0
    Last Post: 2007-06-08, 12:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •