I intended learn to Javascript
and got "HTTP Error 403.14 - Forbidden..." error at first try. I found the solution from a blog. Move to "C:\Program Files\IIS Express" (It may different at your computer) folder and run this command:
appcmd set config /section:system.webServer/directoryBrowse /enabled:true
23 Ocak 2015 Cuma
2 Ocak 2015 Cuma
SQL SERVER - If noone has Sysadmin rights or SA password is lost?
Go to pproperties of relates servers from SQL Server Configuration Manager. Advanced->Properties than put "-m" parameter. Carefull about you have to put ";" after last parameter and put no space! I mean ";-m" (Without quotes).
Restart to SQL Server. Server will run in single mode.
Run SQLCMD.EXE as administrator. Give Sysadmin rights to your Windows user which you use at login for your SQL Server:
EXEC sp_addsrvrolemember "myserver\myuser","sysadmin";
GO
or
EXEC sp_password NULL, 'newpwd', 'sa';
GO
Don't forget delete parameter and restart server at regular mode!..
Source:
http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx
Restart to SQL Server. Server will run in single mode.
Run SQLCMD.EXE as administrator. Give Sysadmin rights to your Windows user which you use at login for your SQL Server:
EXEC sp_addsrvrolemember "myserver\myuser","sysadmin";
GO
or
EXEC sp_password NULL, 'newpwd', 'sa';
GO
Don't forget delete parameter and restart server at regular mode!..
Source:
http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx
25 Aralık 2014 Perşembe
AX 2012 - Consume web service with sample turkish citizen ID check
I used a blog when developing this sample. You can download to ready use XPO from there .
1- Create a new Class Library type C# project at Visual Studio.
2- Press right click at project name, select Add service reference and write https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL to Address, write Sorgula to Namespace and press GO so service reference will be shown.
3- Add your project to AOT with Add to AOT .
4- Go to project properties and make
Debug Target = No
Deploy to Client = Yes
Deploy to EP = No
Deploy to Server = Yes
Deploy to SSRS = No
5. Deploy project and down all AX clients. If you don't down all clients at deploy, deploy will fail accoring to blog writer.
This is my sample job:
//Metin Emre, 2.10.2014
static void TCIDTest(Args _args)
{
CLRObject clientType;
TCKimlik.Sorgula.KPSPublicSoapClient cl;
System.Exception ex;
boolean s,erOccured;
System.Exception e;
str ret;
new InteropPermission(InteropKind::ClrInterop).assert();
try
{
clientType = CLRInterop::getType("TCKimlik.Sorgula.KPSPublicSoapClient");
cl = AifUtil::createServiceClient(clientType);
s = cl.TCKimlikNoDogrula(11111111111,"METİN","EMRE",1999);
}
catch(Exception::CLRError)
{
Ex=CLRInterop::getLastException();
ret = Ex.ToString();
if (!strScan(ret,"Not a valid citizen ID",1,strLen(Ret)))
{
info(Ex.ToString());
erOccured = true;
}
}
if (!erOccured)
info(strFmt("%1",s));
}
11111111111 is citizen ID, name and surname after citizen ID and the last born year. If all these are correct, returns true else false.
1- Create a new Class Library type C# project at Visual Studio.
2- Press right click at project name, select Add service reference and write https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL to Address, write Sorgula to Namespace and press GO so service reference will be shown.
3- Add your project to AOT with Add to AOT .
4- Go to project properties and make
Debug Target = No
Deploy to Client = Yes
Deploy to EP = No
Deploy to Server = Yes
Deploy to SSRS = No
5. Deploy project and down all AX clients. If you don't down all clients at deploy, deploy will fail accoring to blog writer.
This is my sample job:
//Metin Emre, 2.10.2014
static void TCIDTest(Args _args)
{
CLRObject clientType;
TCKimlik.Sorgula.KPSPublicSoapClient cl;
System.Exception ex;
boolean s,erOccured;
System.Exception e;
str ret;
new InteropPermission(InteropKind::ClrInterop).assert();
try
{
clientType = CLRInterop::getType("TCKimlik.Sorgula.KPSPublicSoapClient");
cl = AifUtil::createServiceClient(clientType);
s = cl.TCKimlikNoDogrula(11111111111,"METİN","EMRE",1999);
}
catch(Exception::CLRError)
{
Ex=CLRInterop::getLastException();
ret = Ex.ToString();
if (!strScan(ret,"Not a valid citizen ID",1,strLen(Ret)))
{
info(Ex.ToString());
erOccured = true;
}
}
if (!erOccured)
info(strFmt("%1",s));
}
11111111111 is citizen ID, name and surname after citizen ID and the last born year. If all these are correct, returns true else false.
29 Eylül 2014 Pazartesi
AX 2012 - R3 Installation
In first check minimum system requirements . MS-SQL collate doesn't installed as turkish. With turkish like SAP
and Oracle you'll have problems about "i" letter of turkish, after AX 2012 install, at database sync, installation will fail.
I used Dilip's Blog for installation instead of Microsoft's long and complex white paper. Installation of AX 2012 is so easy of it's mine change. :)
In first Active Directory should be installed. There are plenty of pages about AD installation at Google.
I just used basic AX 2012 like Dilip's, let SSRS etc. installation later. AX 2012 setup gives prerequisities links and configures some of prerequisities automatically. I didn't faced any problem at installation.
After installation I upload demo data again from a blog page . Demo installation was harder than AX 2012 installation.
I installed SQL Server SSRS add-in and configured look from a blog . Anyway for developing SSRS reports (Doesn't require for deploy) don't forget install Business Intelligence Development Studio from SQL Server Setup. SSRS configure was so easy; in order run Service account, Web service URL, Database, Report Manager URL tabs with defaults was enough.
Again I used another Dilip page for SSRS install. I haven't got any trouble and didn't need Dilip's manual complete way for install, reports deployed smootly. :)
I used Dilip's Blog for installation instead of Microsoft's long and complex white paper. Installation of AX 2012 is so easy of it's mine change. :)
In first Active Directory should be installed. There are plenty of pages about AD installation at Google.
I just used basic AX 2012 like Dilip's, let SSRS etc. installation later. AX 2012 setup gives prerequisities links and configures some of prerequisities automatically. I didn't faced any problem at installation.
After installation I upload demo data again from a blog page . Demo installation was harder than AX 2012 installation.
I installed SQL Server SSRS add-in and configured look from a blog . Anyway for developing SSRS reports (Doesn't require for deploy) don't forget install Business Intelligence Development Studio from SQL Server Setup. SSRS configure was so easy; in order run Service account, Web service URL, Database, Report Manager URL tabs with defaults was enough.
Again I used another Dilip page for SSRS install. I haven't got any trouble and didn't need Dilip's manual complete way for install, reports deployed smootly. :)
26 Eylül 2014 Cuma
AX 2012 - If batch jobs cannot start?
If you look up Home->Inquiries->Batch jobs->My batch jobs and see batch jobs don't start.
Go System administration->Setup->System->Server configuration and check there is a record at Batch server schedule with proper time gap (00:00 -23:59) and be careful about Maximum batch threads value bigger than zero.
Also problem maybe about there is no attached server to batch group :
Administration -> setup -> Batch Groups
Find empty batch group and go Batch Servers tab, look for Selected server field has correct server value.
Go System administration->Setup->System->Server configuration and check there is a record at Batch server schedule with proper time gap (00:00 -23:59) and be careful about Maximum batch threads value bigger than zero.
Also problem maybe about there is no attached server to batch group :
Administration -> setup -> Batch Groups
Find empty batch group and go Batch Servers tab, look for Selected server field has correct server value.
15 Eylül 2014 Pazartesi
AX 2012 - Create a new financial dimension which related a table(s)
I found the easy way that the way from a blog which referred Microsoft'un related white paper:
1-Duplicate one of views from AOT which beginned DimAttribute and new views name should be begin same DimAttribute word.
2. Main datasource name should be BackingEntity unrelated what name used with original table name.
3. All field names of view should be like these whatever original names:
Key - data source tables Surrogate key field. Like RecId...
Value - data source tables primary key . Like AccountNum...
Name - Description field. Like Description or CustomerName...
There are two ways to use this new dimension implementation:
AOS restart
or
DimensionCache::clearAllScopes();
command.
1-Duplicate one of views from AOT which beginned DimAttribute and new views name should be begin same DimAttribute word.
2. Main datasource name should be BackingEntity unrelated what name used with original table name.
3. All field names of view should be like these whatever original names:
Key - data source tables Surrogate key field. Like RecId...
Value - data source tables primary key . Like AccountNum...
Name - Description field. Like Description or CustomerName...
There are two ways to use this new dimension implementation:
AOS restart
or
DimensionCache::clearAllScopes();
command.
11 Eylül 2014 Perşembe
AX 2012 - Get an individual dimension value from a LedgerDimension value
I used a data model about ledger dimension from a blog when I create this page. Unfortunately I couldn't understand code written at that blog and wrote this code:
DimensionDefault d = 5637183219;
DimensionAttributeValueCombination dimensionAttributeValueCombination;
DimensionAttributeValueGroupCombination dimensionAttributeValueGroupCombination;
DimensionAttributeValueGroup dimensionAttributeValueGroup;
DimensionAttributeLevelValue dimensionAttributeLevelValue;
DimensionAttributeValue dimensionAttributeValue;
DimensionAttribute dimensionAttribute;
select dimensionAttributeValueCombination
where dimensionAttributeValueCombination.RecId == d
join dimensionAttributeValueGroupCombination
where dimensionAttributeValueGroupCombination.DimensionAttributeValueCombination ==
dimensionAttributeValueCombination.RecId
join dimensionAttributeValueGroup
where dimensionAttributeValueGroup.RecId == dimensionAttributeValueGroupCombination.DimensionAttributeValueGroup
join dimensionAttributeLevelValue
where dimensionAttributeLevelValue.DimensionAttributeValueGroup == dimensionAttributeValueGroup.RecId
join dimensionAttributeValue
where dimensionAttributeValue.RecId == dimensionAttributeLevelValue.DimensionAttributeValue
join dimensionAttribute
where dimensionAttribute.RecId == dimensionAttributeValue.DimensionAttribute &&
DimensionAttribute.Name == "Project";
info(DimensionAttributeLevelValue.DisplayValue);
Update:
The code at up doesn't worked for PurchTable defaultDimension field.
I got this code from Andesoft'un web site :
DimensionDefault d = 5637169331;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
DimensionValue dimensionValue;
DimensionAliasName dimensionName;
dimAttrValueSet = DimensionAttributeValueSet::find(D);
while select dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
{
dimAttrValue = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
dimAttr = DimensionAttribute::find(DimAttrValue.DimensionAttribute);
dimensionvalueentity = DimensionDefaultingControllerBase::findBackingEntityInstance(
curext(),DimAttr,dimAttrvalue.EntityInstance);
dimensionvalue = dimattrvalue.getValue();
info(strFmt("%1 %2",Dimensionvalue, DimAttr.Name));
}
DimensionDefault d = 5637183219;
DimensionAttributeValueCombination dimensionAttributeValueCombination;
DimensionAttributeValueGroupCombination dimensionAttributeValueGroupCombination;
DimensionAttributeValueGroup dimensionAttributeValueGroup;
DimensionAttributeLevelValue dimensionAttributeLevelValue;
DimensionAttributeValue dimensionAttributeValue;
DimensionAttribute dimensionAttribute;
select dimensionAttributeValueCombination
where dimensionAttributeValueCombination.RecId == d
join dimensionAttributeValueGroupCombination
where dimensionAttributeValueGroupCombination.DimensionAttributeValueCombination ==
dimensionAttributeValueCombination.RecId
join dimensionAttributeValueGroup
where dimensionAttributeValueGroup.RecId == dimensionAttributeValueGroupCombination.DimensionAttributeValueGroup
join dimensionAttributeLevelValue
where dimensionAttributeLevelValue.DimensionAttributeValueGroup == dimensionAttributeValueGroup.RecId
join dimensionAttributeValue
where dimensionAttributeValue.RecId == dimensionAttributeLevelValue.DimensionAttributeValue
join dimensionAttribute
where dimensionAttribute.RecId == dimensionAttributeValue.DimensionAttribute &&
DimensionAttribute.Name == "Project";
info(DimensionAttributeLevelValue.DisplayValue);
Update:
The code at up doesn't worked for PurchTable defaultDimension field.
I got this code from Andesoft'un web site :
DimensionDefault d = 5637169331;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
DimensionValue dimensionValue;
DimensionAliasName dimensionName;
dimAttrValueSet = DimensionAttributeValueSet::find(D);
while select dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
{
dimAttrValue = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
dimAttr = DimensionAttribute::find(DimAttrValue.DimensionAttribute);
dimensionvalueentity = DimensionDefaultingControllerBase::findBackingEntityInstance(
curext(),DimAttr,dimAttrvalue.EntityInstance);
dimensionvalue = dimattrvalue.getValue();
info(strFmt("%1 %2",Dimensionvalue, DimAttr.Name));
}
Etiketler:
AX,
ax 2012,
AXAPTA,
ledger dimension,
ledgerdimension,
value attribute
Kaydol:
Kayıtlar (Atom)