Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

HELP, Custom windows from dynamics SL

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, Currently i try create a new personal windows form, how part of my training on VB.net. My windows form include 2 tables (author and books), mi goal is add, modify and eliminate entries of both tables with native functions of dynamics. At this moment have probles to modufy and delete on the safgrid i cand add without problems, but only can modify the first line on the grid. If try delete a register, the application only delete the first one or if select two or more delete the same registers take the first.

When debug the proyect i see the program doesn't send a message to ask if i sure to delete the information when delete from the safgrid control.

Why need to update and/or delete entries in the saftgrid using this buttons???

This is a screen of my proyect

try to delete id 04

when save usig button "save", the id deleted is 0

i apreciate your help and any advice to create custom forms. Have a nice day

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HELP, Custom windows from dynamics SL

    1.- The main table is "Autores" (pk idautor varchar(6), nombre varchar(50), nacionalidad varchar(50)) and "libros" (pk idlibro varchar(6),  nombre varchar (50), editorial varchar(50), year varchar(4), fk idauthor varchar(6))

    index_keys: idlibro, idautor .

    2.- I only use a SP for posible values to idautor on level 0 (select * from autores)

    3.- To fill de grid, I use a query "select * from libros where idautor like @pamr1 order by idlibro" @parm1 is equal bautores.idautor

    4.-  Dim MemHandle_Spread1 As Object

           Call ApplInit()

          

    Call SetAddr(LEVEL0, "bautores", bautores, nautores)

           Call SetAddr(LEVEL1, "blibros", blibros, nlibros)

          

    Call SqlCursorEx(c1, LEVEL0, "c1", "autores", "autores")

           Call SqlCursorEx(c2, LEVEL1, "c2", "libros", "libros")

          

    Call ScreenInit()

           MemHandle_Spread1 = DetailSetup(c2, SafGrid1, PNULL, blibros, PNULL, PNULL, PNULL)

     


    Control SAFUpdate Levels=autores;N,libros;D Name=Update1.

     

     

  • Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: HELP, Custom windows from dynamics SL

    First of all, to know better what the causes are, we need to know four things.
    1.- The structure table, principaly the primary key fields.
    2.- The definition of the store procedure
    3 - The DVNav property of the grid
    4 - The form_load code

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans