Hello
Any idea how to generate product number automatically.all solutions i have found populate ids on create event ,i need something to create id on the form load event.
*This post is locked for comments
Hello
Any idea how to generate product number automatically.all solutions i have found populate ids on create event ,i need something to create id on the form load event.
*This post is locked for comments
Glad that it worked for you.
As for the using through workflow, refer to the Wiki
https://github.com/hncrm/HNIdentifierGenerator/wiki/Generate-Identifier-with-your-entities
The approach is the same. Add the workflow action to your workflow and populate the two provided fields.
Using the example in the previous post,
please note that when I create the Identifier record via (Settings -> HN Extensions --> Identifier) and choose the Reset option to "None" i get the error below :
I then choose another option then save then i choose "None" again then save.
Hope that the JavaScript will work with no reset option.
thanks HN CRM, it worked :)
Please could you also state how to use the solution thru Workflows.
Best Regards,
To use the Identifier Generator for pre-populating the Id via Form Load, follow the steps below.
1. Create the Identifier record via (Settings -> HN Extensions --> Identifier)
2. Utilise the Identitifier in the entity
NOTE:
Hope that helps.
HN CRM I want to use it on form load. Could you please post a link to a tutorial on how to configure this or mention the steps here.
Thanks a lot.
Hi,
This is possible if you rely on a web service to give you unique number from SQL sequence. Following component are required:
1. A SQL azure instance. Here you need to create a SQL sequence with NO CACHE setting.
2. A SQL Stored Proc which call the sequence and return a unique integer value.
3. A REST based service hosted on azure. This will call the SP and return the integer. The service can be authenticated based on azure AD credential. You need to register it on AAD.
4. The onload JS which will check if the formtype is create, it will then called the Azure service and populate the field with inteer value it receives.
The only issue will be that suppose you create a form and you close it without saving then the sequence number will be 'used' and the next time you open the form you will get the next sequence. However it will ensyre that no number are ever duplicated.
Thanks,
Prateek
Can you describe the steps to replicate the issue in the Issue log on Github.
As for specifying the entity name, it depends on how you are using the generator, via client side through Form Load or Workflow?
You do not differentiate between server and client validation. This field is system required and this cannot be changed, and out-of-the-box when you try to save the form you get the JS message that you need to fill this field. Now, when you disable this field you will no longer get the message that this field is required - you will get a message from SERVER validation logic that this field is required. If it's server validation then most likely if you fill this field during Pre-Operation (I believe that Pre-Operation will be anough, but you can always go with Pre-Validation) you will not get this error message and your Product will be saved. I think that you should write your own autonumbering, it's a one-day job and you will have reusable solution for other entities.
Pawel the field is system required so even if I disable it or hide it the system will says "The product number cannot be null"
HN CRM the solution is generating the following error:" DateTime is less than minumum value supported by CrmDateTime" Moreover where do I specify the entity name?
Thank you all for replying
Have a look at Dynamics 365 Identifier Generator available from github.com/.../HNIdentifierGenerator. It supports generation of the auto number both before or after the entity is created.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156