Results 1 to 5 of 5

Thread: CancelSale button click on sales tab

  1. #1
    aswini is offline Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Default CancelSale button click on sales tab

    Hi all,

    I have a Cancel Sale button in list view of sales.I want to cancel the current sale record while clicking this button.That means that record will not remain in the sales listview.Please help me.And also
    I need to know
    1.Where i have to write php script corresponding to this.
    2.How to call this function


    Thank You..
    Last edited by aswini; 2010-03-16 at 10:05 AM.

  2. #2
    jsagar's Avatar
    jsagar is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Ahmedabad,India
    Posts
    242

    Default Re: CancelSale button click on sales tab

    Hi,
    you have to check the javascript function sugarListView.prototype.send_form( ).
    onclik of sale button you can set this function.
    this function will submit the form of your listview. for upgradesafe you can write it in view.list.php.


    you can write php script into your modules/(your module name)/your filename

    hope it helps you.
    Best Regards
    ---------------------------------------
    Jaydeepsinh Sagar

  3. #3
    jlabuelo is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    426

    Default Re: CancelSale button click on sales tab

    Hi jsagar

    I would like to do somethig similar to what is asked in this post. I have a multiSelect field in the Accounts module called "Region". When I have two accounts with values picked in this multiselect fields, sometimes I need to pass the values of the Regions of Account B to the values of the Region of Account A. I have the php code to do this, however dont know exactly how to introduce this in our SugarCRM.

    What I have thought about is to add a button in the Accounts List view (like Import Export...) which is called "Combine Regions", and that will call my php code with the accounts selected in the Accounts list view after running a search.

    Do you see this correct? Could you please point me to the way I must follow to create a button in the Account List View and call the php code with the accounts shown in the view as parameters?

    Thanks a lot for your help in advance

  4. #4
    jsagar's Avatar
    jsagar is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Ahmedabad,India
    Posts
    242

    Default Re: CancelSale button click on sales tab

    hi,
    check javascript function in include/javascript/sugar_3.js
    function is sugarListView.prototype.send_form() this will submit the form. you can copy and paste the javascript in your view.list.php file and submit it to your php file. and process it as you want.

    hope it helps you.
    Best Regards
    ---------------------------------------
    Jaydeepsinh Sagar

  5. #5
    jlabuelo is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    426

    Default Re: CancelSale button click on sales tab

    Thanks a lot ... will give it a try so!!

    Will let you know

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP script call on button click
    By aureh12 in forum Developer Help
    Replies: 8
    Last Post: 2010-11-29, 10:39 AM
  2. Replies: 5
    Last Post: 2009-04-16, 05:49 PM
  3. Replies: 2
    Last Post: 2009-03-02, 09:12 AM
  4. how to create pop-up on click of select button
    By jenifer in forum Developer Help
    Replies: 2
    Last Post: 2008-07-16, 12:27 PM
  5. Replies: 6
    Last Post: 2006-02-03, 03:17 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
  •