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!
|
|
'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
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. |
|
|
| |
|
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
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) |
|
|
|
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
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. |
|
|
|
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
Posted: 15 Sep 11 1:46 PM
|
fiogf49gjkf0d 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.
|
|
|
| |
| |
| |
| |
|
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
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) |
|
|
| |
|
Re: 'Sage.SalesLogix.Entities.Location' is a 'type' but is used like a 'variable'
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. |
|
|
| |
| |
| |
|