locked
auto increment field value number on selecting specific account in lookup field RRS feed

  • Question

  • I have a lookup field with target as "account" on case form.. and also another custom field "selection number". 
    If i select "account 1" in lookup ..the "selection number" field should display 1.. if i select 2nd time the same account .. again the field should increment to 2..
    This should work only for 1 account that is "account 1".....

    How any ever times i select account 1 .. the field should be incremented using a plugin

    Wednesday, April 23, 2014 9:19 AM

Answers

  • Hi,

    If you want that the new number will be display in real time on form you need to use Javascript in Event Change of the lookup else if you want use a plugin, you need to create a Post operation create and update. This will run only when you click save button.

    Bye

    Alessandro


    Alessandro Graps

    • Proposed as answer by [MVP] Alessandro Graps Wednesday, April 23, 2014 11:51 AM
    • Marked as answer by Amy.4 Wednesday, April 23, 2014 12:07 PM
    Wednesday, April 23, 2014 11:51 AM

All replies

  • Hi,

    If you want that the new number will be display in real time on form you need to use Javascript in Event Change of the lookup else if you want use a plugin, you need to create a Post operation create and update. This will run only when you click save button.

    Bye

    Alessandro


    Alessandro Graps

    • Proposed as answer by [MVP] Alessandro Graps Wednesday, April 23, 2014 11:51 AM
    • Marked as answer by Amy.4 Wednesday, April 23, 2014 12:07 PM
    Wednesday, April 23, 2014 11:51 AM
  • Hi,

    can u help me with the exact syntax for a plugin i can use for incrementing a field by 1 for everytime i select "account1" in the lookup

    Thursday, April 24, 2014 6:22 AM
  • Hi,

    yes but you need to use javascript to do this one. 

    The plugin runs only in CREATE, UPDATE, etc. processes. The field will be increment only when you click SAVE button in this case.

    Now I will write the two piece of code to do this..

    Bye

    Alessandro


    Alessandro Graps

    Thursday, April 24, 2014 7:04 AM