Free Source code : SMS Module

Discussion in 'Free Source Codes' started by lumos, Mar 22, 2019.

  1. lumos

    lumos Member

    Hello Everyone, I am new here and this forum has helped me immensely in learning TDL.
    This is a simple code to send SMS at Gateway of Tally.
    Replace API code with yours.
    This is built upon existing code found in forums with further improvements.

    ;;**********==============Sending SMS at Gateway=============***********;;
    ;;[#Menu: Gateway OF Tally] ;;Adding button in main menu
    ;;    Add: Buttons: PartyLedgerhotkey
    ;;    Add :Key Item :Before : @@locQuit : Sms Party :: Alter:partyLedgerclosingbalance
    [Button: PartyLedgerhotkey] ;;Adding Another on the side
        Key: ALT + Z
        Action: alter : PartyLedgerclosingbalance
        Title: "SMS Party"
    [Report: PartyLedgerclosingbalance] ;;calling report definition
        Form: PartyLedgerclosingbalance
        Title: "SMS Party"
    ;;================PartyLedgerSelect ==============;
    [Variable : PartyLedgerselect]
        Type : String
        Persistent : Yes
    [Field: PartyLedgerselect] ;;selecting name of party
        Use: short name field
        Table: Ledger
        Modifies: PartyLedgerselect
    [Form: PartyLedgerclosingbalance]  ;;SMS Text form
        ON : Form Accept : Yes : CALL : TestSMS  ;;calling for sms function
        Part: PartyLedgerclosingbalance
    [Part: PartyLedgerclosingbalance]
        Line: PartyLedgerName, SMSText,PartyLedgerclosingbalance  ;;Name, sms text and closing balance fields of selected party
    ;;===========Defining Feilds for sms=============;
    ;;============Name Field=========;
    [Line: PartyLedgerName]
        Field:partyLedgerName ,PartyLedgerselect
          Use:Name field
          Set as:"Party Name :"
    ;;============Text Field=========;
          Use:Name Field
          Set as:"SMS Text :"
          Use:Name field
          Set as:"Dear Customer your closing balance is "
          Width: 75 mms
          ;Storage: SMSUDF
    ;;====Closing balance Field=====;
    [Line: PartyLedgerclosingbalance]
        Field: PartyClosingBalance,Clbal
          Use:Name field
          set as:"Party Closing Balance :"
          Use:Name field
          Set as:$ClosingBalance:Ledger:#PartyLedgerselect
    ;;================Function for sms===============;
    00 : WALK COLLECTION : Send SMS Coll
    10 : END WALK
    20 : MSGBox : "Status":"Message Sent \n Successful"
    30 : Return
    ;;============Collection For SMS===============;
    [Collection: Send SMS Coll]
    Remote URL :"<Your auth key here>&sender=<Sender>&route=4&mobiles="+@@getmob+"&message="+@@smsText+@@clbal
    ;;============Formula for accessing============;
    [System : formula]
    Getmob : $LedgerMobile:Ledger:#PartyLedgerselect
    Clbal : #clbal
    smstext : #SMSTEXT
    [System : Formulae]
    PartyLedgerselect : ""
    ;;*************==============End of Code=============*************;;
    Suggest improvements if any.
    Last edited: Mar 24, 2019

  2. gcom

    gcom New Member

    sms not working

  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member

    Please read the 3rd line in Post # 1............. replace that and it will work.

  4. lumos

    lumos Member

    As pointed out by Amit Sir you will need to register to a SMS gateway provider and replace api key/credentials provided with yours.

  5. Zeedk90

    Zeedk90 New Member

    I am really happy to find all of these details! Finding appropriate options as per your budget for the marketing is very difficult thing but I'm so glad that with the help of business texting service I have been getting awesome results. This service was suggested to me by my cousin and I will suggest it to other business owners as well.

Share This Page