Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, April 18, 2024 
 
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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Trying to rip off "TicketAddBlahTimeStamp" Business Rules
Mike Boysen
Posts: 53
 
Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Mar 08 7:04 PM
I've totally copied the Ticket Comments and written a new business rule as follows:

namespace Sage.BusinessRules.CodeSnippets
{
public static partial class TicketBusinessRules
{
public static void AddTicketRecreateTimeStampStep1(ITicket ticket)
{
ticket.TicketAddon.StepsToRecreate = TicketHelperClass.AddUserDateTimeStamp() + ticket.TicketAddon.StepsToRecreate;
}
}
}

However, when I hit the button I get the following error (pardon my .NET virginity)

Unable to locate type information 'Sage.BusinessRules.CodeSnippets.TicketBusinessRules, Sage.SnippetLibrary.CSharp' for business rule 'Ticket.AddTicketRecreateTimeStamp'

Can someone clue me in?? Thanks in Advance.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 9:57 AM
Your business rules get added to a DLL named Sage.SnippetLibrary.CSharp.dll and the class "TicketHelperClass" that contains the AddUserDateTimeStamp method exists in the DLL named Sage.SalesLogix.BusinessRules.dll.

So, you're trying to use a method/class that you've not referenced. Does that make sense?

You have two choices:

1) Copy the needed code from the TicketHelperClass to your business rule, duplicating the logic there.

2) Add a reference to the Sage.SalesLogix.BusinessRules.dll so you can use that code. In order to do this you need to modify your codesnippets.xml file so that it references the Sage.SalesLogix.BusinessRules.dll for builds of the Sage.SnippetLibrary.CSharp.dll file and then add a using directive to the rule to reference the namespace that TicketHelperClass is in.

Does that make sense?

-Ryan
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 10:10 AM
Makes sense Ryan. Thanks for your help. I guess they're telling us to get with the program because the program is changing!

Seems harder, but I can see where some things are much easier. This should be an adventure
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 10:49 AM
Uh....where's the codesnippets.xml file? Hehe

Answer: Searched and didn't find it. Read the FAQ and found it at

C:\Documents and Settings\All Users\Application Data\Sage\Platform\Configuration\Global
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 11:04 AM
Yep - that's it.

(BTW, for anyone on Vista it is found at C:\ProgramData\Sage\Platform\Configuration\Global)

-Ryan
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 11:07 AM
Quote:
Originally posted by Mike Boysen

Makes sense Ryan. Thanks for your help. I guess they're telling us to get with the program because the program is changing!

Seems harder, but I can see where some things are much easier. This should be an adventure


Some of it will take some playing with before it clicks - but once it does, you'll love it. I completely hate getting back into LAN client development now. I try to fill my development queue with as many web projects as possible - they're way more fun
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 11:13 AM
Can you give us a quick lesson on identifying the namespace?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 11:36 AM
Quote:
Originally posted by Mike Boysen

Can you give us a quick lesson on identifying the namespace?


Using reflector. Just select the class and you'll easily be able to identify the namespace.



-Ryan
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 11:38 AM
So just to point out, the DLL you'd add to your codesnippets.xml file is:
Sage.SalesLogix.BusinessRules.dll

And the namespace is for your using directive:
Sage.SalesLogix.Ticket (TicketHelperClass is the class name)

-Ryan
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 12:11 PM
Quote:
Originally posted by Mike Boysen

Uh....where's the codesnippets.xml file? Hehe

Answer: Searched and didn't find it. Read the FAQ and found it at

C:\Documents and Settings\All Users\Application Data\Sage\Platform\Configuration\Global


BTW, in 7.2.2 you no longer have to edit that XML file, instead you can do the following:

Quote:
When viewing the code for your Code Snippet in the tabbed MDI workspace in Application Architect, use the combo box at the top of the docked Properties window to select “Sage.Platform.Orm.Entities.CodeSnippetHeader. This will show the editable properties for the code snippet. Edit the AssemblyReference collection and add your reference. The comments at the top of your code snippet will be updated to reflect the new assembly reference as well.

Notes about HintPath: The HintPath property is not necessary for any assemblies located in the GAC. The %BASEBUILDPATH% environment variable is used to point to the build output location for the Application Architect code generation. Out of the box, this points to C:\Documents and Setting\\Application Data\Sage\Platform\Output.


-Ryan
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 12:18 PM
I had already tried Sage.SalesLogix.Ticket in the usings. Didn't work. I'm wondering if something is not getting built.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 1:16 PM
What are you basing that on? Not showing up in Intellisense or a build error? If it that it isn't in Intellisense, don't worry about that. If it is from a build error, what is it?
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 1:16 PM
Just to check. Is this the correct reference in codesnippets?

%BASEBUILDPATH%\assemblies\Sage.SalesLogix.BusinessRules.dll

(The reference tags are being stripped and I forget the way to include them)

I'm uncertain about the path. This is what my business rule looks like. Anything obviously wrong? It's frustrating not knowing what to look for

#region Usings
using System;
using Sage.Entity.Interface;
using Sage.SalesLogix.Ticket;
#endregion Usings

namespace Sage.BusinessRules.CodeSnippets
{
public static partial class TicketBusinessRules
{
public static void AddTicketRecreateTimeStampStep1(ITicket ticket)
{
ticket.TicketAddon.StepsToRecreate = TicketHelperClass.AddUserDateTimeStamp() + ticket.TicketAddon.StepsToRecreate;
}
}
}
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 1:24 PM
Quote:
Originally posted by Mike Boysen

Just to check. Is this the correct reference in codesnippets?

%BASEBUILDPATH%\assemblies\Sage.SalesLogix.BusinessRules.dll



%BASEBUILDPATH% translates to the path where the AA builds the assemblies. Take a look at that location. You can see where that location is by checking the Tools | Build Settings menu. Look at that path and you'll see the Sage.SalesLogix.BusinessRules.dll is not located there. That DLL won't be located in the build path at all since it is not built by the AA. You can just add the full physical path to the DLL and it should work.

-Ryan
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 1:38 PM
I'm going to owe you a few beverages of your choice if I see you at Insights
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 1:42 PM
Quote:
Originally posted by Mike Boysen

I'm going to owe you a few beverages of your choice if I see you at Insights


Hope to see you there!
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 1:54 PM
You'll probably recognize me from my picture ROFL
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 2:07 PM
I assumed you meant the dll thats in the inetpub structure. Let me know if the following is a problem from my build


ERROR - C:\Documents and Settings\saleslogixsync\Application Data\Sage\Platform\Output\Sage.SnippetLibrary.CSharp\src\Sage.SnippetLibrary.CSharp.@.7a836261-1393-4568-a3f6-3bb2022b810e.codesnippet.cs(22,19):The type or namespace name 'Interface' does not exist in the namespace 'Sage.Entity' (are you missing an assembly reference?)
ERROR - C:\Documents and Settings\saleslogixsync\Application Data\Sage\Platform\Output\Sage.SnippetLibrary.CSharp\src\Sage.SnippetLibrary.CSharp.@.7a836261-1393-4568-a3f6-3bb2022b810e.codesnippet.cs(30,60):The type or namespace name 'ITicket' could not be found (are you missing a using directive or an assembly reference?)
INFO - Done building project "Sage.SnippetLibrary.csproj" -- FAILED.
INFO - Build FAILED.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 2:12 PM
You have this in your usings:

using Sage.Entity.Interface;


That is not a valid namespace. Change it to this (you're missing the "s" at the end):

using Sage.Entity.Interfaces;


-Ryan
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 2:21 PM
That did it. Thanks again. I must have backspaced over that "s' at some point. I have a lot to learn but I made some headway today.

BTW, I never expected you to respond so quickly and frequently. But, I appreciate it.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Mar 08 2:24 PM
Glad it is working now.

Quote:
Originally posted by Mike Boysen

BTW, I never expected you to respond so quickly and frequently. But, I appreciate it.


I love this new stuff, so don't mind taking a few minutes to respond to these kinds of questions.
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Trying to rip off "TicketAddBlahTimeStamp" Business RulesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Mar 08 10:18 AM
Quote:
Originally posted by Ryan Farley



BTW, in 7.2.2 you no longer have to edit that XML file, instead you can do the following:

-Ryan


Ryan.

I'm on 7.2.2 and I do not see this in the drop down box. Thus, I cannot edit the default references within Application Architect. Maybe I'm not looking in the right place. I've checked in business rules and code snippet and the drop downs do not contain the reference you pointed out. Any ideas?

NEVERMIND: I found it
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 4/18/2024 10:31:29 AM