11/22/2024 9:51:41 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
|
|
|
|
How do I generate a pretty key for a ticket?
Posted: 23 Dec 07 3:09 AM
|
So how exactly do I go about generating a pretty key (An alternatekeyprefix/suffix) from an external application.
The only thing I have to use is the OLEDB Provider...
help?
Thank you in Advance Shane |
|
|
|
Re: How do I generate a pretty key for a ticket?
Posted: 23 Dec 07 6:04 AM
|
A pretty key is simply an easier way of looking at the ID ordinarily generated. If you open the Ticket Detail form you will notice (almost at the very end) there is a Sub PrettyKey - just, ahem, borrow that code |
|
|
|
Re: How do I generate a pretty key for a ticket?
Posted: 23 Apr 08 8:58 AM
|
A little late on this one but I just figured this one out the other day. It works, may not be pretty (still feeling my way around SalesLogix land) After migrating data over and loading the ticket table (granted we did not use the ticket tables prior to the new SLX upgrade) the Ticket number did not generate and the issue came up. Anyway the solution was actually not that bad first I used a sql data reader to return all of the ticket without a ticket number, then I sent it to a function that returns the prettykeyprefix, and then prettykeysuffix. The ids are generated by using the GetPrettyKeyPrefix() and GetPrettyKeySuffix(). In short the code looks simlar to:
First reference saleslogix.exe for the application.
Then I used a Data reader to get all tickets without a ticket number (pretty keys)
While MyReader.Read
TICKETID = MyReader("TICKETID")
UpdateTicketTable(TICKETID)
End While
then:
Public Sub UpdateTicketTable(ByVal TICKETID As String)
Dim SLXO As New SlxApplication Dim Val1 As String Dim Val2 As String
Val1 = SLXO.BasicFunctions.GetPrettyKeyPrefix(TICKETID) Val2 = SLXO.BasicFunctions.GetPrettyKeySuffix(TICKETID)
Update the ticket table code here.....
This worked pretty good, one little caveate to this you do have to have the sales logix client open to perform this.
May not be pretty, but it worked....
"Never, never, never, never give up." Winston Churchill
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|