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)

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

I have the same question (0)
  • Fujimi DB Profile Picture
    275 on at

    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

  • Community Member Profile Picture
    on at

    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.  

  • Barry Flynn Profile Picture
    3,090 on at

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

  • Barry Flynn Profile Picture
    3,090 on at

    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

  • Fujimi DB Profile Picture
    275 on at

    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

  • Verified answer
    Blaine Bryant Profile Picture
    on at

    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.

  • Community Member Profile Picture
    on at

    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.

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