Wednesday 28 November 2018

Wednesday 17 October 2018

Get new GUIDs using Aras AML Studio

Requirement: Get  3 new GUIDs, which are not used in Aras Innovator.
Solution:
Open NASH
Ex: http://localhost/innovator/Client/scripts/nash.aspx
Login using admin or root
Under Action select: GenerateNewGUIDEx (Instead of ApplyAML())
Under XML: type below. quantity="3" mean it will return, 3 new GUIDs
<Item quantity="3" />

Thursday 11 October 2018

Aras Innovator disable a control after save

How to disable a control after save?
Prerequisites: Control property should be required field.
Solution:

Create new Item Type ex: TestItem

Add new properties
Ex: test1, test2 as string data type

Add new JS method: Ex: MyTest

For textbox control:

var myTestField = getFieldByName("test1");

//var myTestFieldValue = myTestField.querySelector("input[name='test1']").value;//Another way to get value
if (myTestField.value)
{
    setTimeout(function(){
        myTestField.getElementsByTagName("input")[0].disabled = true;
    }, 1);
}

For DDL (List Data Type):
var varMyddl = getFieldByName("mydll");

if (varMyddl)
{
    If(varMyddl.value){
        setTimeout(function(){      
            varMyddl.getElementsByTagName("input")[0].disabled = true;   
            varMyddl.getElementsByTagName("button")[0].disabled = true;

        }, 1);
    }

}

Open Item Type: TestItem
Under View, open TestItem form
Lock TestItem form
Click on  "Form Event"
Add method by click on +
Search for "MyTest"
Under Event, select "onFormPopulated"

Testing:
Create new item
Enter value for test1
Hit on Save
Now test1 control will be disable

Tuesday 9 October 2018

SQL NOT LIKE will not applicable for NULL values

Example:
select * from emp WHERE Name NOT LIKE '%ABC%' --will return only where Name not like %ABC%, but will not return where Name is NULL

select * from emp WHERE (Name NOT LIKE '%ABC%' OR Name IS NULL) --will return only where Name not like %ABC% and will return where Name is NULL

Monday 20 August 2018

Set-ExecutionPolicy Unrestricted RemoteSigned

Get-ExecutionPolicy
RemoteSigned

if you want to change to Unrestricted, try below script

Set-ExecutionPolicy Unrestricted -Scope CurrentUser

if you want to change to RemoteSigned, try below script

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Thursday 21 June 2018

Monday 18 June 2018

Aras Innovator filesRevision

filesRevision:
This setting controls when the client machine has to refresh all Aras Innovator settings, used whenever there is an update to the Innovator.  This setting is in the web.config file, in the …\Innovator\Client\ directory (Example: C:\Program Files (x86)\Aras\Innovator\Innovator\Client\). The setting is part of the chachingModule tag. 

</runtime> 
<cachingModule moduleEnabled="true" filesRevision="std" />
 </configuration>

 Every time a change is made to the static content on the server (html, images, etc.) you need to change this value from std to 2, 3, 4, etc.  As with any change to production, Aras strongly suggests you notify users to log out of their current session while deploying the change.   Any changes made to the Aras Innovator installation require the following steps to ensure deployment to all users:

Deploy the change to the installed code tree on the server.
Edit the web.config file in the Client folder. 
Set the appropriate filesRevision value:   
  ...    </runtime> 
<cachingModule moduleEnabled="true" filesRevision="2" />
</configuration>

Restart the w3svc service(IIS).

Thursday 14 June 2018

Invalid object name 'LOCALE'.



Invalid object name 'LOCALE'.

refer:
http://community.aras.com/en/forums/topic/320-support-qampa-exception-during-initialization/

Login failed for user 'innovator_regular'.

The Database is not available:Cannot open database "Inn" requested by the login
The login failed.

Login failed for user 'innovator_regular'.

solution

Open SSMS
Expand Security
Expand Logins
Right click on  innovator_regular user
Select Properties
Click on User Mapping
check under Map for your data base
Check db_owner
Ok

or

run below

exec sp_change_users_login 'Update_One', 'innovator_regular', 'innovator_regular'

exec sp_addrolemember 'db_owner','innovator_regular'

Print or Save the Web page as .PDF Using Java Script

http://www.2my4edge.com/2013/06/print-or-save-web-page-as-pdf-using.html
http://www.namasteui.com/jspdf/

Aras Innovator change Data base connection string

If you have installed Aras Innovator
Go to IIS
Expand Sites-->Default Web Site
Select your Innovator web site: ex: InnovatorServer
Right click on InnovatorServer
Select Explore
You will land at : C:\Program Files (x86)\Aras\Innovator\Innovator
Go one folder up
C:\Program Files (x86)\Aras\Innovator
You will find InnovatorServerConfig.xml
In the above file data base connection string will be there
Open InnovatorServerConfig.xml file in notepad administrator mode
you will find <DB-Connection

<DB-Connection
 id="Innovator"
 database="InnovatorSolutions"
 server="localhost"
 uid="innovator"
 pwd="innovator" />

in the above line, you can change db server and name

Wednesday 13 June 2018

Error , 'Aras.IOM.Item' does not contain a constructor that takes 2 arguments

var selectedItemClass = new Item("Item Class", "get"); -Javascript
Error: Line number 18, Error Number: CS1729, 'Aras.IOM.Item' does not contain a constructor that takes 2 arguments

Item selectedItemClass = this.getInnovator().newItem("Item Class", "get"); - C#

ArasLabs

https://github.com/ArasLabs

Install Aras Innovator

We can install Aras Innovator in Server or client
For server installation-
https://www.youtube.com/watch?v=2uof2j-ZjIU

For client installation-
https://www.youtube.com/watch?v=OaR0zs7ma9s

Monday 4 June 2018

Aras Innovator error System.Net.WebException: The remote server returned an error: (503) Server Unavailable

Aras Innovator error System.Net.WebException: The remote server returned an error: (503) Server Unavailable

Root cause: IIS
Solution: I have un installed IIS and re-installed, then it has resolved the issue.

Thursday 24 May 2018

Just-in-time debugging, errors


Just-in-time debugging, errors
JIT

Click on start
Search for: visual studio installer
Click on Update
After installing all
Click on Modify
Select .Net Desktop Development
In the right side, check Just-in-time debugging

Error: provider: TCP Provider, error: 0 - The remote computer refused the network connection


Solution:
Go to this path: C:\Windows\SysWOW64
Open: SQLServerManager13
Click on : SQL Server Network Configuration
Expand above one
Select : Protocols for <server> (SQL Server Configuration Manager)
Enable all protocols

Click on: SQL Server Services

Restart all services

Wednesday 2 May 2018

C# XML Parser

public XmlReader GetXMLReader(string xmlSource)
{
StringReader strReader = new StringReader(xmlSource);
XmlReaderSettings settings = new XmlReaderSettings();

settings.XmlResolver = new XmlUrlResolverWithCache();
//    settings.DtdProcessing = DtdProcessing.Parse;
    settings.DtdProcessing = DtdProcessing.Prohibit;
return XmlReader.Create(strReader, settings);
}

Aras Innovator Reporting services

Friday 12 January 2018

C# UWA StatusCode: 415, ReasonPhrase: 'Unsupported Media Type'

Error: StatusCode: 415, ReasonPhrase: 'Unsupported Media Type'

Root cause:

        var jsonContent = JsonConvert.SerializeObject(InputContent);
       StringContent content = new StringContent(jsonContent );

       var result = await client.PostAsync("http://localhost/MyAPI/api/login", content);

content is not having right media type

Solution:

format content to right media type

  var jsonContent = JsonConvert.SerializeObject(InputContent);
       StringContent content = new StringContent(jsonContent ,Encoding.UTF8, "application/json"); 

       var result = await client.PostAsync("http://localhost/MyAPI/api/login", content);