6/28/2025 9:30:06 AM
|
|
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 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.
|
|
|
|
Failing to modify/add entities
Posted: 30 Mar 12 6:20 AM
|
fiogf49gjkf0d Hello !
I'm working with the 7.5.2.2151 version of Application Architect and i'm having a simple problem : i can't use the entities i created in AA in smartparts after deploying my portal. Here is what i did (i'm sorry if the terms are not exactly the same in english version, i'm working on a french version of AA) :
In architect : I created a new table and added several fields to it (varchar and slxboolean). I added fields (still varchar and slxboolean) to tables already existing and already linked to an entity.
In AA : For new tables : Right clic on SalesLogix Application Entities => New entity => Create a new entity with existing table => choose my new table => next => next => finish. Right clic on the entity in the list => Rename => Wait the "correspondance research" ends, then rename it. Double clic on the entity => Rename several properties then save entity.
For updated tables : Right clic on the entity => Update properties => Select the new fields and validate. Double clic on the entity => Rename several properties then save entity.
Next, i deleted the Output and ReferenceAssemblies directories content, rebuild the web plateform and deployed SlxClient, sdata and ProcessHost in my c:\inetpub\wwwroot\SlxClient . But when i open the website with visual studio and want to use the new entity properties, it just doesn't exist. The updated entities are the same as before and the new entities simply don't exist.
By the way, I'm trying to use it this way :
ICrm_EntityName entityInstance = null; entityInstance = EntityFactory.GetRepository<ICrm_EntityName >().Get(EntityId ); if (entityInstance != null) { entityInstance.NewProperty = "RandomString"; }
The strange thing is when i copy/paste the files Sage.Entity.Interfaces.dll and Sage.Form.Interfaces.dll from the Output\assemblies to my website's /bin, the new properties are ready to work (but i think it's not the only files i need). So did i do something wrong ? Why the assemblies are different between the Output directory and the deployed website ? How can i have my entities back ?  |
|
|
|
Re: Failing to modify/add entities
Posted: 30 Mar 12 8:57 AM
|
fiogf49gjkf0d Did you check for Errors during the Build?
I recommend you Build Interfaces first and check for Errors.
If you are doing a Full Build, and there are errors building Interfaces, the error won't necessarily cause the Site to fail to build, instead it will include the old Entity DLLs on the Deployment.
So, as stated above, Build Interfaces and Address any errors that may be visible. If Interfaces are build, the do a Full Build (Rebuild).
Then, Delete all the files from your Targeg folder (e.g. SLXClient) and then do a Deployment (so if the folder remains it would mean that the Deployment was pointing to a different folder).
|
|
|
|
Re: Failing to modify/add entities
Posted: 30 Mar 12 9:53 AM
|
fiogf49gjkf0d Thanks for the answer !
Originally posted by Raul A. Chavez If you are doing a Full Build, and there are errors building Interfaces, the error won't necessarily cause the Site to fail to build, instead it will include the old Entity DLLs on the Deployment. |
|
This is helpful to know, and may explain why I always get my old entities instead of the new ones. So i tried your method :
Building Entities Interfaces first gives me 2 warning (and one warning about MSBuild not running in a Single-Threaded Apartment mode). I translated it from french into english, i appologize if it's not exactly the same as in the english AA.
WARN - C:\Documents and Settings\[...]\Application Data\Sage\Platform\Output\interfaces\Sage.Entity.Interfaces.ExtendedTypeData.resx(0,0):MSB3568 : The duplicated resource name "Account_Accountid" is not allowed and will be ignored. WARN - C:\Documents and Settings\[...]\Application Data\Sage\Platform\Output\interfaces\Sage.Entity.Interfaces.ExtendedTypeData.resx(0,0):MSB3568 : The duplicated resource name "Contact_Contactid" is not allowed and will be ignored.
I had no other Errors, so i did a rebuild, deleted my SlxClient folder and deployed the portal again ; I still don't have my entities.
I have no idea why i get those 2 warnings, can they cause the "rollback" on DLLs ? Where can i found their source ? |
|
|
|
Re: Failing to modify/add entities
Posted: 30 Mar 12 10:44 AM
|
fiogf49gjkf0d Are you doing this on a Single Machine? App Architect and Web Site all local?
Could you do a Search on your machine for the Sage.Entity.Interfaces.dll ?
Are you doing something else on VS that may be overwritting DLLS?
I once ran into a Situation where there were Multiple Projects on My VS Solution. I was adding a Reference to the Output from one of the Related Project, which had references to some of the SLX DLLs.
So, whenever I opened the Solution, at some point the DLLs on the Bin folder were updated from my Second Project (the referenced one) and it was bringing in not just my Custom DLL, but the referenced DLL.
In this case, I had to first manually propagate my DLLs to all affected Projects right after Deploying, then I was able to Open the Site with VS without having my DLLS being "rolled back" to previous versions by my other projects.
|
|
|
|
Re: Failing to modify/add entities
Posted: 02 Apr 12 3:56 AM
|
fiogf49gjkf0d I'm working on a Virtual Machine and yes, the App Architect and the Web Site are local during the developpement ; but i have other Slx websites deployed on the same virtual machine. It has never been a problem since i always delete the Output and ReferenceAssemblies folders and do a full rebuild before deploying a portal different of the one i'm working on.
In VS, i only have one project in the solution : I always open the site with the "Open Web Site" option and I never save the .sln.
I don't think i'm doing something particular that can overwrite my DLLs in VS, but the research for Sage.Entity.Interfaces.DLL shown me that i have 5 different locations for files named like this :
- C:\Program Files\SalesLogix\ReferenceAssemblies : which is the Assemblies path in AA => Tools => "Build paremeters" (still don't know which words are used in english, sorry :s) The file is alone in this folder.
- C:\Program Files\SalesLogix\SalesLogix : it seems to be a realy old DLL since it is half the size of the current DLL. I don't know why it is here and there is other DLL like Sage.SalesLogix.NHibernate.dll or Sage.SalesLogix.Deployment.dll in this folder.
- In the ProcessHost\bin, the sdata\bin and the SlxClient\bin of my deployed websites.
- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\MySiteName\[...].
I tried to delete all the temporary asp.net files then rebuild and open again the website with VS but it gave nothing.
I found a temporary solution to continue my work : copy/paste all the DLL in the output folder in my project's bin. But i realy want to avoid doing this for each deployment i do :/
|
|
|
|
Re: Failing to modify/add entities
Posted: 02 Apr 12 4:14 PM
|
fiogf49gjkf0d Where specifically are you placing the Build from AA? We are having troubles with placing it in other than application data\sage\platform\output..... |
|
|
|
Re: Failing to modify/add entities
Posted: 03 Apr 12 2:10 AM
|
fiogf49gjkf0d If i understand the question, i didn't move the build. Here are my settings :
On the tools => Modify build parameters :
First textbox : C:\Documents and Settings\devii\Application Data\Sage\Platform\Output
Second textbox : C:\Program Files\SalesLogix\ReferenceAssemblies
Third textbox is empty.
In my deployment :
IIS target parameters =>Server : LocalHost ; root folder : c:\inetpub\wwwroot\MySiteName ; Port : 80 ; Application group : SalesLogix ; Deploy target checked ; Restore parameters[...] unchecked
SlxClient => Virtual folder : MySiteName ; Subfolder : MySiteName ; deploy portal checked ; Precompile unchecked
Starting portal => Inherit from target Checked ; Port & Application Group empty
Can it help ? |
|
|
| |
| |
|
Re: Failing to modify/add entities
Posted: 11 Apr 12 6:28 AM
|
fiogf49gjkf0d Up ! I'm still blocked, i tried to save my VFS and recreate another one without success.
Someone has another idea why the DLL's in the output folder are not used by the deployment ? |
|
|
|
Re: Failing to modify/add entities
Posted: 12 Apr 12 7:33 AM
|
fiogf49gjkf0d Another up, i just found that a colleague added a few times ago a new file in the Entity Model\CodeTemplates\Entity folder.
It's a copy/paste of Default-Class-SalesLogix with one add ; he wanted a property "TABLENAMEID" instead of the "Id" property. Here is the code he added (between lines 398 and 399) :
<# } else if (prop.PropertyName.ToUpperInvariant() == (entity.TableName.ToUpperInvariant() + "ID")){ #> get { return _Id; }
I figured it was related with the 2 Warnings i'm getting so i tried to delete it (this, by the way, deleted ALL the templatefiles) and do a full rebuild ; but this time i simply can't build and i have this error :
ERROR - System.ApplicationException: Cannot find a valid code template for entity 'Activity Tracking Event' at Sage.Platform.Orm.CodeGen.BaseTemplateGenerator.FindTemplate(OrmEntity entity) at Sage.Platform.Orm.CodeGen.BaseTemplateGenerator.Generate(OrmEntity entity, TextWriter writer) 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.GenerateForPackage(IProject project, OperationStatus op, BuildType buildType, RegisteredDeploymentPackage deploymentPackage) at Sage.Platform.AdminModule.AdminModuleInit.BuildWebObjectsImpl(OperationStatus op)
I don't know at all what those files are doing and where they're used... Any idea or process to achieve a full rebuild after this ? |
|
|
|
Re: Failing to modify/add entities
Posted: 12 Apr 12 7:56 AM
|
fiogf49gjkf0d Leodry,
I have been customising/building/deploying etc. since 7.2 beta and can safely say I have never seen anything like the errors you are describing.
Your best bet here is to bundle out any changes you have made, import a whole new VFS from the install DVD, do a FULL REBUILD. (Leave the Entity Model changes you described above - I wouldnt move those to the new VFS).
I see you are messing with the Entity Model\Code Templates - don't do this unless you know exactly what you are doing...
Once you have a built fresh Eval VFS, now add your bundle and see if it builds. If it doesnt you have some "corrupt" customisations but at least it will point you in the right direction.
If it still doesnt work after a fresh Eval VFS install - remove App Architect completely and do a reinstall.
Thanks,
Nick |
|
|
|
Re: Failing to modify/add entities
Posted: 12 Apr 12 8:00 AM
|
fiogf49gjkf0d Originally posted by Leodry
Hello !
I'm working with the 7.5.2.2151 version of Application Architect and i'm having a simple problem : i can't use the entities i created in AA in smartparts after deploying my portal. Here is what i did (i'm sorry if the terms are not exactly the same in english version, i'm working on a french version of AA) :
In architect : I created a new table and added several fields to it (varchar and slxboolean). I added fields (still varchar and slxboolean) to tables already existing and already linked to an entity.
In AA : For new tables : Right clic on SalesLogix Application Entities => New entity => Create a new entity with existing table => choose my new table => next => next => finish. Right clic on the entity in the list => Rename => Wait the "correspondance research" ends, then rename it. Double clic on the entity => Rename several properties then save entity.
For updated tables : Right clic on the entity => Update properties => Select the new fields and validate. Double clic on the entity => Rename several properties then save entity.
Next, i deleted the Output and ReferenceAssemblies directories content, rebuild the web plateform and deployed SlxClient, sdata and ProcessHost in my c:\inetpub\wwwroot\SlxClient . But when i open the website with visual studio and want to use the new entity properties, it just doesn't exist. The updated entities are the same as before and the new entities simply don't exist.
By the way, I'm trying to use it this way :
ICrm_EntityName entityInstance = null; entityInstance = EntityFactory.GetRepository<ICrm_EntityName >().Get(EntityId ); if (entityInstance != null) { entityInstance.NewProperty = "RandomString"; }
The strange thing is when i copy/paste the files Sage.Entity.Interfaces.dll and Sage.Form.Interfaces.dll from the Output\assemblies to my website's /bin, the new properties are ready to work (but i think it's not the only files i need). So did i do something wrong ? Why the assemblies are different between the Output directory and the deployed website ? How can i have my entities back ? 
|
|
FYI when you build/deploy you do not have to do anything with these directories:
"Next, i deleted the 'Output' and 'ReferenceAssemblies' directories content
In fact its probably a bad thing deleting the content from these.
|
|
|
|
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!
|
|
|
|
|
|
|
|