web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Importing daily timecard comments

(0) ShareShare
ReportReport
Posted on by

Does anyone know how to import daily timecard comments from an external source into Timecard Entry?

*This post is locked for comments

I have the same question (0)
  • Carolyn Kolpien Profile Picture
    on at

    Hi Chuck,

    You need a specific control macro which I have copied below.  Give this a try and let me know how it goes.

    '$include: "bsl.dh"

    'PANOT Control Macro

    Sub ProcessImportLine( LevelNumber%, Retval% )

     select Case LevelNumber

       case TI_Start

         call AliasConstant( "Level0", "notes" )

       case 0 ' 0 of 0

       'Level 0 if of Type N

         ' cnote_type_cd is a key field for level 0

         ' Field mask is UUUU

         ' NOTE  -- This field is a required field

         serr = SetObjectValue( "cnote_type_cd", ImportField(1) )

         ' ckey_value is a key field for level 0

         ' Field mask is UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

         ' NOTE  -- This field is a required field

         serr = SetObjectValue( "ckey_value", ImportField(2) )

         ' ckey_index is a key field for level 0

         ' Field mask is 99

         ' NOTE  -- This field is a required field

         serr = SetObjectValue( "ckey_index", ImportField(3) )

         call setprop("txtmsg","text",ImportField(4))

    'Currently Disabled clu_logon_id

    'Currently Disabled cnote_desc

    'Currently Disabled clu_date

       case TI_Finish

     End Select

    End Sub

    ' The following shows the correct syntax to

    '  PRESS a button

    ' These object names are specific to this screen.

    '      Button object name cmdButnBar, Caption

    '      serr = SetObjectValue( "cmdButnBar", "PRESS" )

    '      Button object name cmdButnBar, Caption

    '      serr = SetObjectValue( "cmdButnBar", "PRESS" )

    '      Button object name cmdButnBar, Caption

    '      serr = SetObjectValue( "cmdButnBar", "PRESS" )

  • Community Member Profile Picture
    on at

    Carolyn

    Thanks a lot!

    Chuck

  • Community Member Profile Picture
    on at

    Carolyn

    Does this macro apply to a timecard that already exists?  If so, is there a different macro for importing daily comments as part of a new timecard?

    Thanks,

    Chuck

  • Carolyn Kolpien Profile Picture
    on at

    Hi Chuck,

    I believe it will work for both since the comments have to be imported separately from the timecard import.  Let me know how it goes.

  • Community Member Profile Picture
    on at

    Carolyn

    Sounds good.

    Thanks again,

    Chuck

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans