Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Add key field to existing screen

(0) ShareShare
ReportReport
Posted on by

We are in the midst of implementing SL2011 FP1, so I am relatively new to SL and the customization tools.

We want to modify the Address Maintenance screen (2125000) by adding a key field for the customer ID.  Currently this screen only uses the address ID as the key field, we want to have both the customer ID and the address ID as the key fields.  We would like to do F3 lookup to the customer ID/Names first and then have the address ID lookup be constrained to only the addresses for the customer selected.  So that we can have multiple Address IDs for each Customer ID.  Is this possible using Customization Manager?

I was thinking that the steps needed are:

1. In Customize Mode, add a new Textbox for the Customer ID using a "User" field.  Set its PV property to "customer_all"  Set its Level property to 0,k, set its Tabindex property to 1 (and change the addressID fields tabindex to 2).

2. Create a new Stored Procedure and a new PV CSV file based on address_all, changing Parm1 to custid and parm2 to addrid.  Import the new PV CSV file using the Possible Values Import.

3. Change the PV property on the addrID field to the newly created and imported PV.

 

Can anyone tell me:

1.  If this is a possiblity? 

2. Am I on the right track for the customization? Am I missing anything? and if not, where I could find an explanation for doing this.

 

Thanks!

 

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Add key field to existing screen

    Thanks to all for your replies and suggestions.  We are either going to build our own screen or try using the Shipping Address Maintenance screen for this.

  • Verified answer
    Blaine Bryant Profile Picture
    on at
    RE: Add key field to existing screen

    JCrickey,

    Biggest problem is often the screens won’t let you change the PV fields in customization manager

    For a screen like this, where you really only have 1 level and no grid, it’s probably easier and faster to just create your own screen.   Could even just end up storing it in the standard address table in the DB.

    For more information on how to do this install the user guides provided with your download of SL, after they are installed they should be in the application folder (\\Program Files (x86)\Microsoft Dynamics\SL\Applications\User Guides). The User Guide you are looking for will be the SoftwareDevelopmentKit.pdf.

  • Fujimi DB Profile Picture
    275 on at
    RE: Add key field to existing screen

    I see; I thought I must have misunderstood something. Thanks for the clarification.

    Is there any reason why you couldn't just create multiple Customer ID records? You could then use a user field in Customer maintenance to tie the customer records together under one parent customer ID (assuming that you need this type of correlation for reporting purposes).

    Thanks,

    db

  • Barry Flynn Profile Picture
    3,090 on at
    RE: Add key field to existing screen

    Bear in mind also that the screen, the kernel, and SQL Server all think that AddrId is the sole key brcause it is the primary key.

    I don't suggest changing the table's primary key !!

    So, a given AddrId must be unique.

    A different approach might be to create a View, which has a column consisting of (say) User1 + '-' + AddrId

    You could then create a PV based on that View..

    Then my theory gets a little vague & woolly...

    Perhaps add a different User Field to the screen, which uses the new PV.

    So the user uses that field to find the Cust-Addr row that they want.

    You would have some VBA code in that field's Chk event which extracts the AddrId portion of the combined CustId_AddrId, then uses SetObjecttValue to poke that AddrId into the AddrId control.

    Don't know if that will work,

    One obvious potential problem is that the kernel doesn't like you entering any field until the key field(s) have been entered.

    So the new combined-field may have to be level 0,k.

    I don't know if customization mgr will allow you to enter a level of 0,k

    And if it does, I don't know if that will (a) work, or (b) causr any other problems.

    -----

    << I am relatively new to SL and the customization tools.

    I think you've got a "challenging" job to start out with !! :)

    Or maybe I'm just overlooking some really obvious way of doing it.

    Barry

  • Barry Flynn Profile Picture
    3,090 on at
    RE: Add key field to existing screen

    << 2. Create a new Stored Procedure and a new PV CSV

    << file based on address_all, changing Parm1 to custid and

    << parm2 to addrid.  Import the new PV CSV file using the Possible Values Import.

    That can (sometimes?) be done, but I have found it quite tricky. The syntax is REALLY picky.

    If you do go down this path, I suggest:-

    - Find another field somewhere which has a PV with 2 parameters

    - In customization, make a trivial change to, say, the Left property

    - Exporting the customization you have just done to a cst file

    - Open the cst file in Notepad and pick up the PV entry. That will give you the exact syntax required.

    - I'm not sure if you will be able to enter your PV as a property of the user field. If not, export to cst, VERY CAREFULLY edit the cst in Notepad, then import the edited cst.

    Make sure you have (cst file) backups all the way - so if it all turns to custard, you have a "good cst file" that you can import and get things back to the way they were before you started.

    << 3. Change the PV property on the addrID field to the newly created and imported PV.

    I don't think you can do this.

    I believe that the rule is that customnization mgr will let you chaneg a PV only if the control is added by the same customization.

    So, you can add a PV to your User field, but I don't think you can do so on the AddrId field.

    I'll continue in a second post

    Barry

  • Community Member Profile Picture
    on at
    RE: Add key field to existing screen

    Thanks for your response.   Your response certainly is logical but the Customer Addresses that we need to enter are their Billing addresses not shipping addresses.  According to the consultant from our Microsott partner group, we need to use the Address Maintenance screen we cannot use the Shipping Address screen in order for the billing to work for multiple bill-to addresses per client.  That is why we are trying to modify the Address Maintenance screen.  

  • Fujimi DB Profile Picture
    275 on at
    RE: Add key field to existing screen

    Hi JCrickey,

    I might be confused about what you're trying to accomplish by customizing the Address Maintenance screen. At any rate, if your customers have multiple addresses, then enter them into the Shipping Address screen (08.262.00) in the AR module.

    Thanks,

    db

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,927 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans