Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

DSLGrid saving problem

(0) ShareShare
ReportReport
Posted on by 67

Good morning friends!

I have a problem with a custom SDK screen that I cannot figure out.  The screen is simple and consists of one DSLGrid.  The underlying table has 3 columns (acct,subacct,active).  I have the grid populating correctly, and new rows can be added to the grid.  However, nothing can be modified.  As soon as I change a value in the grid (i.e. active) and click save, the windows icon spins and spins and nothing happens.  I have to kill the screen.  Please see below:

Fields in Grid:

DSLMaskedText   Field:  bxnxAPAV.Acct   Level: 0,k

DSLMaskedText   Field:  bxnx.APAV.SubAcct   Level: 0,k

DSLCheck   Field:  bxnxAPAV.Active   Level: 0

Grid:

DSLGrid  DBNav:  "Select * from xnxAPAV where acct like @parm1 and SubAccount like @parm2 order by Acct, SubAccount", "bxnxAPAV.Acct"; 0; 0; 0; 1, "bxnxAPAV.SubAccount"; 0; 0; 0; 1, 

Update1:  Levels:  DETAIL;D

Please let me know your thoughts folks!  I am stuck here!  Thank you in advance for assistance.

  • KyleBWillman Profile Picture
    67 on at
    RE: DSLGrid saving problem

    This is a great answer.  I think you are correct, I made no real changes to the settings I provided originally, and something happened on a subsequent build, and it just started working.  I am not sure why.  I will mark as correct, because I believe the information provided will be extremely informative to others having a problem with settings related to custom grid development in SDK.  Thank you, Juan, I appreciate the response.

  • Verified answer
    Apps Mexico Profile Picture
    1,090 on at
    RE: DSLGrid saving problem

    Hi,

    Everything seems to be correctly. Can you please share the T-SQL of table definition specialy the primary key (name and fields). Also the code of the Form1_Load to see the call to DetailSetup and SetAddr. I asume that SL isn't finding the primary key on update event.

    In other hand If you are interested on a workaround you can add a LineNbr field to the table. Use this field as PK, and leave the Level: 0,k to the Acct and SubAcct field on the screen to avoid the duplicated records on user input.

    CREATE TABLE dbo.xnxAPAV(
    	Acct varchar(10) NOT NULL,
    	Active char(1) NOT NULL,
    	LineNbr smallint NOT NULL,
    	SubAcct varchar(24) NOT NULL,
    	tstamp timestamp NOT NULL,
    	 CONSTRAINT [xnxAPAV0] PRIMARY KEY CLUSTERED 
    	(
    		LineNbr
    	) ON [PRIMARY]
    	) ON [PRIMARY];
    
    Me.Update1.Levels = "bxnxAPAV;D"
    
    Call Init_xnxAPAV(LEVEL0, True)
    MH_xnxAPAV = DetailSetup(CSR_xnxAPAV, SafGrid1, bxnxAPAV.AddressOf("LineNbr"), bxnxAPAV, PNULL, PNULL, PNULL)
    
    Me.SafGrid1.SetSLDBNav(Me.SafGrid1, """xsp_xnxAPAV_DBNav"", ""bxnxAPAV.LineNbr""; 0; 0; 0; 1,")
    
    CREATE PROCEDURE xsp_xnxAPAV_DBNav @LineMin smallint, @LineMax smallint
    AS
    	SELECT * 
    	FROM xnxAPAV
    	WHERE LineNbr BETWEEN @LineMin AND @LineMax
    	ORDER BY LineNbr
    GO

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 601 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 416

#3
Adis Profile Picture

Adis 384 Super User 2025 Season 1

Product updates

Dynamics 365 release plans