Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 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: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
Gary Pierre
Posts: 10
 
'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 12:37 PM
fiogf49gjkf0d

Hi my company just got the latest version of Sage Saleslogix (7.5.4) and I have been responsible to customize the crm to fit the needs of the company.


This is a definite learning curve for me and I needed some help with an error that I getting...


 


Ok, Im using the Sage Application Architect and there are the Product and Package entity which I changed to accomodate of company. So basically, I tried to change any reference of those entities to relate to Deals and Locations.


 


So for reference:


Product = Deal


Package = Location


 


What I did is was go through the entities (including their forms and properties) and replaced Products with Deals and Packages with Locations (respectively).


Then I clicked "Build Web Platform" and then got this error message:


 


ERROR - C:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\implementation\LocationDeal.cs(381,40):'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
INFO  - Done building project "Sage.SalesLogix.Entities.csproj" -- FAILED.
INFO  - Build FAILED.
ERROR - Failed to build Sage.SalesLogix.Entities.dll.


 


Of course it has to do with the changes that I made but I not sure if I overlooked something. Now I dont know what to look for.


I would appreciate any advice or help on this issue. Thanks in advance.


 


Gary D.

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 12:53 PM
fiogf49gjkf0d

I located the file that the error is referring to and the line location and found this piece of code:


public override string ToString()
        {
            return String.Format("{0}",Location);
        }


 


I dont know if this may be helpful. I would include the entire code the file is too large.

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 1:02 PM
fiogf49gjkf0d

Hi,


 


I also receive this error after running the "Build Web Platform":


 


===================================

An application exception has occurred.

===================================

Failed to build Sage.SalesLogix.Entities.dll. (Sage.Platform.Orm.CodeGen)

------------------------------
Program Location:

   at Sage.Platform.Orm.CodeGen.ServerEntityDeploymentPackage.BuildProject(IEnumerable`1 buildItemFiles, Engine engine)
   at Sage.Platform.Orm.CodeGen.ServerEntityDeploymentPackage.GenerateInternal(OperationStatus op, BuildType buildType)
   at Sage.Platform.Extensibility.DeploymentPackageBase.Generate(OperationStatus op, BuildType buildType)
   at Sage.Platform.Extensibility.Services.RegisteredPlatform.Generate(IProject project, OperationStatus op, BuildType buildType)
   at Sage.Platform.AdminModule.AdminModuleInit.Deploy(RegisteredPlatform platform, OperationStatus op, BuildType buildType)
   at Sage.Platform.AdminModule.AdminModuleInit.BuildWebObjectsImpl(OperationStatus op)
   at Sage.Platform.AdminModule.AdminModuleInit.DoBuildWebObjects(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.DoWorkEventHandler.Invoke(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 1:04 PM
fiogf49gjkf0d

What this means is that on one of the replacements you made, you changed a "variable" name to point to the Type rather than a new Variable of type = "Location"


 


e.g.   Sage.SalesLogix.Entity.Package p = .......


  p = Sage.SalesLogix.Entity.Location;


 


Now, maybe this is just caused by using the same name as the  "Type" for a Variable somewhere...


Did you try doubleclicking on that line to open the file and then viewing the code at that line? That would give you a better idea of what is going on.

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 1:46 PM
fiogf49gjkf0d

Quote:
Originally posted by Raul A. Chavez


Did you try doubleclicking on that line to open the file and then viewing the code at that line? That would give you a better idea of what is going on.



Hi Raul,


 


Thanks for the feedback. Yes, I opened the file that its referring to and on the 380 line, 40 column I get this:


public override string ToString()
        {
            return String.Format("{0}",Location);
        }


 


The " return String.Format("{0}",Location); " is what the error is referring to. Any ideas? Thanks a lot.


 


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 1:59 PM
fiogf49gjkf0d

When you open the Entity, then go to the SalesLogix Extended tab, do you have a formula there for the Description field?


Is it a correct formula? Is the syntax correct? Are you using a valid Property name?


 

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 2:05 PM
fiogf49gjkf0d

In the SalesLogix Extended tab, there isnt a description field. There are 2 fields:


String Expression = ${Name}


Track History To = None


 


There is also a Description tab, but it is empty

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 2:07 PM
fiogf49gjkf0d

Now that I think of, Im thinking about reverting my changes and somehow just changing the display name of the entities. This should make it easier for me, as I don't know what settings I need to change being new to Saleslogix.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 2:20 PM
fiogf49gjkf0d

I called it Description, but meant String Expression.


Do you have a field called "Name" on your Location Object ?


The ToString method is build upon this field, and the code generated should've been:   return String.Format("{0}",Location.Name);

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 2:54 PM
fiogf49gjkf0d

I opened the file referenced in the error with Visual Studio and replaced the code with yours, but for some reason my changes weren't change but now it did.


Now I get this error:


INFO  - Build of QuickForms for Web Platform complete.
INFO  - Deploying file \deployment\webroot\common\bin\Sage.Form.Interfaces.dll to Web
ERROR -
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\slxdev\Model\Entity Model\SalesLogix Application Entities\Product\QuickForms\Sage.SnippetLibrary.CSharp.@.397d7597-a618-430c-b7bd-329ee7da1f6c.codesnippet.cs'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
   at Sage.Platform.FileSystem.Disk.DiskFile.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at Sage.Platform.FileSystem.FSFile.Copy(IFileInfo sourceFile, IFileInfo destFile, Boolean overwrite, Boolean touch)
   at Sage.Platform.FileSystem.FSFile.Copy(IFileInfo sourceFile, IFileInfo destFile, Boolean overwrite)
   at Sage.Platform.Orm.Entities.CodeSnippetLibraryBase.CompileSnippetAssembly(Boolean force)
   at Sage.Platform.Orm.Entities.CodeSnippetManager.BuildAllLibraries(Boolean forceOverwrite)
   at Sage.Platform.AdminModule.AdminModuleInit.GenerateCodeSnippetLibraries(BuildType buildType)
   at Sage.Platform.AdminModule.AdminModuleInit.BuildWebObjectsImpl(OperationStatus op)

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 3:01 PM
fiogf49gjkf0d

You can't change the file, it is automatically generated based on your Entities definition.


I was asking you to check if the String Description is valid. Maybe try removing it.


Then execute a full build (CTRL + Build button).


 


 

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 3:01 PM
fiogf49gjkf0d

Disregard the previous reply, I tried again and it rendered the original error. The ending is the error I posted first but there are some errors before that that might be causing the error... Sorry for the long code.


INFO  - Generating Hibernate mapping file for UnitOfMeasure
INFO  - Generating Server Entity for UnitOfMeasure
ERROR - C:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\templates\Default-Class-SalesLogix.tt(0,0) : error : Error running transform: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sage.Platform.Orm.Entities.OrmCodeSnippetProperty.get_CodeSnippet()
   at Microsoft.VisualStudio.TextTemplating.GeneratedTextTransformation5728032f.TransformText()
   at Mono.TextTemplating.TemplatingEngine.Run(Assembly assem, String type, ITextTemplatingEngineHost host, CultureInfo culture)
   at Mono.TextTemplating.CompiledTemplate.Process()
INFO  - Generating Hibernate mapping file for UnitOfMeasureGroup
INFO  - Generating Server Entity for UnitOfMeasureGroup
ERROR - C:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\templates\Default-Class-SalesLogix.tt(0,0) : error : Error running transform: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sage.Platform.Orm.Entities.OrmCodeSnippetProperty.get_CodeSnippet()
   at Microsoft.VisualStudio.TextTemplating.GeneratedTextTransformation5728032f.TransformText()
   at Mono.TextTemplating.TemplatingEngine.Run(Assembly assem, String type, ITextTemplatingEngineHost host, CultureInfo culture)
   at Mono.TextTemplating.CompiledTemplate.Process()
INFO  - Generating Hibernate mapping file for Urgency
INFO  - Generating Server Entity for Urgency
ERROR - C:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\templates\Default-Class-SalesLogix.tt(0,0) : error : Error running transform: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sage.Platform.Orm.Entities.OrmCodeSnippetProperty.get_CodeSnippet()
   at Microsoft.VisualStudio.TextTemplating.GeneratedTextTransformation5728032f.TransformText()
   at Mono.TextTemplating.TemplatingEngine.Run(Assembly assem, String type, ITextTemplatingEngineHost host, CultureInfo culture)
   at Mono.TextTemplating.CompiledTemplate.Process()
INFO  - Generating Hibernate mapping file for UserSubscription
INFO  - Generating Server Entity for UserSubscription
ERROR - C:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\templates\Default-Class-SalesLogix.tt(0,0) : error : Error running transform: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sage.Platform.Orm.Entities.OrmCodeSnippetProperty.get_CodeSnippet()
   at Microsoft.VisualStudio.TextTemplating.GeneratedTextTransformation5728032f.TransformText()
   at Mono.TextTemplating.TemplatingEngine.Run(Assembly assem, String type, ITextTemplatingEngineHost host, CultureInfo culture)
   at Mono.TextTemplating.CompiledTemplate.Process()

INFO  - Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
INFO  - for Microsoft (R) .NET Framework version 3.5
INFO  - Copyright (C) Microsoft Corporation. All rights reserved.
INFO  -
ERROR - C:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\implementation\LocationDeal.cs(381,40):'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
INFO  - Done building project "Sage.SalesLogix.Entities.csproj" -- FAILED.
INFO  - Build FAILED.
ERROR - Failed to build Sage.SalesLogix.Entities.dll.

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 3:03 PM
fiogf49gjkf0d

Sorry I misunderstood what you meant. I'll try that now.

[Reply][Quote]
Gary Pierre
Posts: 10
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 11 3:09 PM
fiogf49gjkf0d

I tried removing the String Expression and rebuilt it, but it gives me the same error.

[Reply][Quote]
Alex
Posts: 11
 
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Oct 15 5:36 AM

Try to delete this Entity and then rectreate it, dont forget about relationships, if they exist.

[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): 11/22/2024 2:15:54 PM