On altering the UDF Value using the Action Modify Object, why doesn’t it alter?

Discussion in 'Knowledge Base' started by admin, May 17, 2013.

    
  1. admin

    admin Administrator Staff Member


    User Defined Fields (UDFs) are special data storage artifacts which hold multiple values, hence specifying an index is mandatory while altering the same using Action Modify Object.

    For example, a UDF which is associated at the Voucher Object is required to be altered. The same can be done as shown below:

    [#Form: Normal Day Book]

    Add : Button : UDFAlterButton

    [Button: UDFAlterButton]

    Key : F8
    Title : "UDF Alteration"
    Action : Modify Object : TestUDF[1].TestUDF : "Test"
    Scope : Selected Lines

    The above code modifies the UDF Values of all the selected vouchers in the Daybook on clicking the Button titled UDF Alteration. Since the above code is meant to alter only the first value of the UDF, specifying index is optional. So, the same can also be specified as TestUDF[].TestUDF.
     
    naren1234 likes this.


  2. JObimon Arackal JOhn

    JObimon Arackal JOhn Active Member


    Thank you Sir.
     


  3. Murali.R

    Murali.R Member


    Nice, Thanks Sir
     



  4. Dear sir, if i want to modify original basicshipdocumentno then i have wrote thie below code, why its not working?

    ;; modify challan from daybook
    [#Form: Normal Day Book]

    Add : Button : UDFAlterButton

    [Button: UDFAlterButton]

    Key : F8
    Title : "DC Entry"
    ;Action List: enterLRno,updateLRNO
    ;Action List: setno,saveno
    Action:Call:updatelr
    [Key:setno]
    Action:Execute:dcchange
    [Key:saveno]
    Action:Call:updatelr

    [Function:updatelr]
    Variable: vch :String

    01:Walk Collection:myseletedvch
    02:Set:vch:"ID:"+$$String:$MasterID
    03:New Object:voucher:##vch
    03a:Execute:dcchange
    04: Set Value:Basicshipdocumentno:##myvarlr
    05:Accept Alter
    06:End Walk
    [Collection:myseletedvch]
    Data Source:Report:selected
    [System:Formulae]
    ab:$$String:##myvarlr

    [Report:dcchange]
    Form:dcchange

    [Form:dcchange]
    Part:dcchange
    Width: 20% page
    Height:20% page


    [Part:dcchange]
    Line:dcchangetl,dcchangedl
    [Line:dcchangetl]
    Fields:name field
    Local:Field:default:Type:String
    Local:Field:name field:Info:" LR No Details "

    [Line:dcchangedl]
    Fields:dcnum
    [Field:dcnum]
    Use: name field
    Set as:""
    Modifies:myvarlr


    [Variable:myvarlr]
    Type:String
     
    Bidyut Banerjee likes this.




  5. Dear Admin


    Would you please help in this .
     



  6. Define variable on function you get result
     


Share This Page