Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

F3 lookup on custom field

Posted on by Microsoft Employee

Hi

I have added a textbox to the Customer Maintenance screen bound to User5 field in Customer table, i created a SP based on Customer_All (called 'Customer_All2') which references User5 field in the select statement, i created an entry in PVREC.csv and imported it, so far so good.

I can type in the field and F3 and the correct results are displayed in the lookup or F3 - type - tab to get the same, but when i click OK, hoping for the Customer Maintenance screen to be populated i receive 'System Message 6114 - All key fields must be entered before you can enter data into this field', i click ok and the focus is on the CustomerID box with nothing else displayed.

Please can anyone assist with what i need to do to get the customer data to display.

Thank you

*This post is locked for comments

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: F3 lookup on custom field

    Ian

    A couple of thoughts, which are variations of  the same basic approach.

    You could write some code in the CustId_PV event.

    That event fires when the user hits F3, and it allows you to ovtain a CustId by any means that you like, and then tell the system either "Here's the CustId to use", or "I didn't obtain one - pleaes do "normal PV stuff".

    That might be worth investigating.

    An alternative might be to add a button to the screen "find the customer".

    The user clicks that.

    Your code then obtains a CustId, and does a SetObjectValue to pass it  to the real CustId field.

    In both cases, one way of obtaining the CustId that you want would be to call a separate program to perform the task, and pass the result back to you.

    (If you make any use of fields on the Customer Mtce screen, the kernel may not like it - and give you the original error.)

    The "sub program" could have a single field with your own PV.

    A disadvantage  might be that the user would have to hit F3 twice - once in the original screen, then again in the sub-screen.

    Could you get around that with SendKeys??

    If you have VBTools (the SL SDK) then the "sub screen" could be written in VBTools.

    That has the advantage that it will "look like an SL screen, and it can easily pass the CustId back tothe original screen by calling ScreenExit appropriately. Your VBA code in the original screen xould use ApplGetReturnParms to uplift it.

    Hope those rambling thoughts are some use.

    Barry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: F3 lookup on custom field

    Hi Barry

    Thank you for your response, sorry for the vague description, let me see if i can give you some additional info.

    Within our CRM we have added a field called 'Cluster', this provides a place to enter the Parent company name, for example 'IBM Software' and 'IBM Research' will be seperate companies within the CRM at seperate physical locations, but are both in the Cluster called 'IBM'.  What we are trying to do is recreate the Cluster field in Dynamics SL and be able to use the cluster to find customers.  We would like to F3 in the cluster field and look for IBM, then select the individual customer from the lookup and have the Customer Maintenance screen populated.

    Your description of identifying the custid that we want to load is correct.

    I hope this makes sense.

    Thank you

    Ian

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: F3 lookup on custom field

    Ian

    I don't quite follow what you are trying to do.

    The key field in Customer Maintenance is the CustId field.

    If you look at that field's Properties in Customozation, you will (probably!) see that the Level property is 0,k.

    (I don't have SL open as I type this, so I'm typing from memory.)

    That "k" in the Level property means that it is a Key field.

    As a generatl rule, you enter Key fields to bring up the record you want. Then you can enter other fields in that record.

    Until the key fields are entered, and the corresponding record loaded, it is pointless entering other fields, because there is no record loaded.

    The kernel will generally prevent you from entering other fields until the key fields have been entered.

    Are you using your user field as a means of identifying the CustId that you want to load?

    If so, you may be able to do that by having VBA code on your custom field's Chk event which does a SetObjectValue of the kety CustId field.

    But, as I said earlier, I'm not quite sure what you are attempting to achieve, so my comments may be off the mark.

    Barry

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans