Results 1 to 7 of 7

Thread: if condition in custom code

  1. #1
    prajeesh is offline Senior Member
    Join Date
    Jun 2009
    Posts
    64

    Default if condition in custom code

    Hi

    I would like to put an if else statement in the customcode in editviewdefs.php. Please guide me.


    Thanks,
    Prajeesh.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: if condition in custom code

    Have a look at modules/Leads/metadata/editviewdefs.php

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: if condition in custom code

    Imn theory this works fine and in developer mode as well but the caching kill syou on this one ... good luck .. christian.

    Quote Originally Posted by andopes View Post
    Have a look at modules/Leads/metadata/editviewdefs.php

    Cheers

  4. #4
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: if condition in custom code

    You have to do your logic in Smarty code, not PHP code. That way, Sugar's caching is not a problem.
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  5. #5
    infosugarcrm is offline Member
    Join Date
    Apr 2010
    Posts
    7

    Post Doubt please :how to validate condition before save the form

    Dear Experts,

    i had a doubt past 2 months no guide please help me,i created a form ,fields are name,age,through developer studio
    but i want age validation,before save condition is "if age is greater than 50 years display age is higher,if age is less than 50 years display age is lower,(just popup before save)
    i tried i did not get ,
    please provide me code ,
    how to write code?
    where should i place this code?

    and also i want to know how to use logic hooks ? where should i place the location?
    and also i need path of placing logic hooks?
    please let me know

    wating for replay
    S.M.Prasanth

  6. #6
    infosugarcrm is offline Member
    Join Date
    Apr 2010
    Posts
    7

    Default Re: if condition in custom code

    Dear Experts,

    i had a doubt past 2 months no guide please help me,i created a form ,fields are name,age,through developer studio
    but i want age validation,before save condition is "if age is greater than 50 years display age is higher,if age is less than 50 years display age is lower,(just popup before save)
    i tried i did not get ,
    please provide me code ,
    how to write code?
    where should i place this code?

    and also i want to know how to use logic hooks ? where should i place the location?
    and also i need path of placing logic hooks?
    please let me know

    wating for replay
    S.M.Prasanth

  7. #7
    routledge is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    London
    Posts
    98

    Default Re: if condition in custom code

    Hi There

    Did you resolve this issue????? If not please message back

    Regards

    John

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. custom function call from custom code field in metadata
    By josh.sweeney in forum Developer Help
    Replies: 9
    Last Post: 2010-02-09, 09:23 PM
  2. custom field with condition
    By muniek in forum Help
    Replies: 3
    Last Post: 2009-07-14, 01:18 PM
  3. Custom code for a custom field in default module
    By kodikarthi in forum Developer Help
    Replies: 7
    Last Post: 2009-02-19, 04:25 PM
  4. Replies: 0
    Last Post: 2008-07-14, 04:40 PM
  5. Custom fields in Alert Template Condition?
    By prismusa in forum Help
    Replies: 2
    Last Post: 2007-01-18, 05:30 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
  •