2 Replies Latest reply on Jun 8, 2011 6:03 AM by bablahemen

    Validation of records before creating

    bablahemen

      Title

      Validation of records before creating

      Post

      Hello,

      I have 2 tables, 1st Quote 2nd Sales Instruction.

      I have a script running by clicking an button on to first DB, to create the Sales Instruction for the current quote when the user wants. which copy the record to another DB ( Sales Instruction DB).

      I want to have an script which i want to run before the records is copy. I.E, it will check in Sales Instruction DB wheather the Sales instruction is made for the Same Quote or not( Custome Message with YES OR NO). if its made for the same quote users should be allowed to make another SI for the same. else exit.

      Can anyone help me with the script. i took the help of FM Help, but no success.

      Thanks.

        • 1. Re: Validation of records before creating
          jasongan_1

          I guess you have Quote ID in both Quote table and Sales Instruciton table. so the two table can have relationship based on this Quote ID.

          And the relationship will set up to create a record for the Sales Instruction side whenever you create a Quote record.

          the relationship will be one to one.

          That way you don't need to validate anything. you can have all the related fields from both tables showing on one layout.

          Give it a try.

          Or use a script to check if there is record existed in Sales Instruction when you click on the button on the Quote table. This way it also needs a relationship created

          between Quote and Sales Instruction based on Quote ID / #.

          Hope it helps.

          Jason Gan

          • 2. Re: Validation of records before creating
            bablahemen

            Jason,

            I am not able to find out that script for validation. can u give me an smiple script.

            Hemen .