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 :
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.

I have the same question (0)
  • Verified answer
    Apps Mexico Profile Picture
    1,090 on at

    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

  • KyleBWillman Profile Picture
    67 on at

    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.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans