Quantcast
Channel: Martin Dráb's Activities
Viewing all 17532 articles
Browse latest View live

State not found and County not found AIF exceptions when creating Sales Order via C# library

$
0
0

I have an inbound port defined on an AX 2012 R3 CU13+ instance 2 for Sales Order functionality.  I have X++ code that calls a C# library which interacts with the inbound port on instance 2 to create a sales order.  This instance 1 is also AX 2012 R3 CU13+ and I can create the sales order fine if I leave out the state and county assignments.  I realize that the Polish address that I am attempting to set (just in this case) does not have an address format that supports setting the county and state however, is there a way to find out this ahead of time?

Here is the code in my C# library that sets up the address record.

var salesTableAddressRec = new AxdEntity_TableDlvAddr()
{
City = "Kalinowo",
County = "Carlow",
State = "Ireland",
Street = "Mazurowo 30/1",
ZipCode = "19-314",
CountryRegionId = "POL"
};

I should also mention that at first I was creating the sales order at one point inside my x++ code and just calling the C# library code for the service reference only and the address did not complain to me about this.  We decided to use C# for the actual code so I need to see if there is a way to determine before setting the values (they will be passed in to the C# library via parameters instead of hard-coded) what address components are required and which ones are not, for that particular entity.

Any help would be appreciated as I don't want to go back and re-write the code in X++, it is much more difficult doing it there for some things.


D365Fo with SFTP

$
0
0

Hi experts,

I have public SFTP server and i have local one box (VHD) server. Can i connect the SFTP server from Local one box . because its giving me time out error.

where as i can connect the local server SFTP (Private Server ) (Private - Private) i can connect

and i can connect the azure server with Public SFTP server.

but when i am connecting public SFTP with local server its throwing an error.Please help me to resolve this issue.

Form Designing Error

$
0
0

Hi Guys,

while opening the display menu item(product control menu item),it is showing the error as

"the menu item with name req gridview could not be opened in d365fo"

and i also tried the following cases

SQL , AOS Restart ,FullBuild and SYNC. but the problem is not still resolved, Please help me solve this error.

Note- This is not  customization.

Can I include a reference to Microsoft Dynamics AX classes in my C# code.

$
0
0

I know how to call C# methods and library classes from X++ but I am trying to reference an X++ class in C# code. I have seen an article that seems to indicate it is possible but I cannot figure out how to include a reference to the Microsoft.Dynamics.AX namespace (or something like it). Is there a way to do this?

State not found and County not found AIF exceptions when creating Sales Order via C# library

$
0
0

I have an inbound port defined on an AX 2012 R3 CU13+ instance 2 for Sales Order functionality.  I have X++ code that calls a C# library which interacts with the inbound port on instance 2 to create a sales order.  This instance 1 is also AX 2012 R3 CU13+ and I can create the sales order fine if I leave out the state and county assignments.  I realize that the Polish address that I am attempting to set (just in this case) does not have an address format that supports setting the county and state however, is there a way to find out this ahead of time?

Here is the code in my C# library that sets up the address record.

var salesTableAddressRec = new AxdEntity_TableDlvAddr()
{
City = "Kalinowo",
County = "Carlow",
State = "Ireland",
Street = "Mazurowo 30/1",
ZipCode = "19-314",
CountryRegionId = "POL"
};

I should also mention that at first I was creating the sales order at one point inside my x++ code and just calling the C# library code for the service reference only and the address did not complain to me about this.  We decided to use C# for the actual code so I need to see if there is a way to determine before setting the values (they will be passed in to the C# library via parameters instead of hard-coded) what address components are required and which ones are not, for that particular entity.

Any help would be appreciated as I don't want to go back and re-write the code in X++, it is much more difficult doing it there for some things.

Form Designing Error

$
0
0

Hi Guys,

while opening the display menu item(product control menu item),it is showing the error as

"the menu item with name req gridview could not be opened in d365fo"

and i also tried the following cases

SQL , AOS Restart ,FullBuild and SYNC. but the problem is not still resolved, Please help me solve this error.

Note- This is not  customization.

COC Local varibale access

$
0
0

HI All,

I have written a COC  for a class 

class BankReconciliationWorksheetViewModel
{

// class has method

public void performMatchingProcess()
{

int  ismatchsucessfull;

}

}

my COC for this class

[ExtensionOf(classStr(BankReconciliationWorksheetViewModel))]
final class IBankReconciliationWorksheetViewModel_Extension
{
public void performMatchingProcess()
{

next performMatchingProcess();

if (ismatchsucessfull == true)   // throwing error not declared 

{

//my logic

}

else 

{

//my logic 

}

}

as mentioned I am not able to access the local variable of base class through COC , Please advise. thanks

thanks,

Karunakaran

Can I include a reference to Microsoft Dynamics AX classes in my C# code.

$
0
0

I know how to call C# methods and library classes from X++ but I am trying to reference an X++ class in C# code. I have seen an article that seems to indicate it is possible but I cannot figure out how to include a reference to the Microsoft.Dynamics.AX namespace (or something like it). Is there a way to do this?


Cannot configure workspace in VSTS when DevOps using GIT as version control?

$
0
0

Hi My current company using "GIT" (instead of "Team Foundation Version Control") as version control in Azure DevOps, so when I connect to the FO project in DevOps, there is no option for me to map my workspace.  And it is default to a local directory like "C:\Users\<admin user>\Source\Repos\Dynamics 365 FO".  I believe I have to map ii to "K:\AosService\PackagesLocalDirectory", but I don't have option to map workspace at all.

Did I understand this wrong?  How would "GIT" work for D365 Finance and Operations projects?  Is that even supported for Finance and Operation?

Form handler

$
0
0

How to properly publish formHandler in form?

State not found and County not found AIF exceptions when creating Sales Order via C# library

$
0
0

I have an inbound port defined on an AX 2012 R3 CU13+ instance 2 for Sales Order functionality.  I have X++ code that calls a C# library which interacts with the inbound port on instance 2 to create a sales order.  This instance 1 is also AX 2012 R3 CU13+ and I can create the sales order fine if I leave out the state and county assignments.  I realize that the Polish address that I am attempting to set (just in this case) does not have an address format that supports setting the county and state however, is there a way to find out this ahead of time?

Here is the code in my C# library that sets up the address record.

var salesTableAddressRec = new AxdEntity_TableDlvAddr()
{
City = "Kalinowo",
County = "Carlow",
State = "Ireland",
Street = "Mazurowo 30/1",
ZipCode = "19-314",
CountryRegionId = "POL"
};

I should also mention that at first I was creating the sales order at one point inside my x++ code and just calling the C# library code for the service reference only and the address did not complain to me about this.  We decided to use C# for the actual code so I need to see if there is a way to determine before setting the values (they will be passed in to the C# library via parameters instead of hard-coded) what address components are required and which ones are not, for that particular entity.

Any help would be appreciated as I don't want to go back and re-write the code in X++, it is much more difficult doing it there for some things.

Form Designing Error

$
0
0

Hi Guys,

while opening the display menu item(product control menu item),it is showing the error as

"the menu item with name req gridview could not be opened in d365fo"

and i also tried the following cases

SQL , AOS Restart ,FullBuild and SYNC. but the problem is not still resolved, Please help me solve this error.

Note- This is not  customization.

How can i get the count of duplicate lines in the Grids

$
0
0

Description:

                 There are duplicate lines in Grid , after i execute the page , and i need get the count of duplicate grid from Grid in unit test code,

                 because the duplicate line not exist in SQL, so i cannot use Select statement to do it .and i only get them from grid , but i don't know which method i can use to realize it.

                could you give some suggestions ,thanks!

                            

Filter on Selected List

$
0
0

Good Morning,

Hope you are fine.

There is users group form where we have selected list and available list

Can we apply filter on that.Is there any possibility.

Please show some light on this.

Regards,

Have a great day.

COC Local varibale access

$
0
0

HI All,

I have written a COC  for a class 

class BankReconciliationWorksheetViewModel
{

// class has method

public void performMatchingProcess()
{

int  ismatchsucessfull;

}

}

my COC for this class

[ExtensionOf(classStr(BankReconciliationWorksheetViewModel))]
final class IBankReconciliationWorksheetViewModel_Extension
{
public void performMatchingProcess()
{

next performMatchingProcess();

if (ismatchsucessfull == true)   // throwing error not declared 

{

//my logic

}

else 

{

//my logic 

}

}

as mentioned I am not able to access the local variable of base class through COC , Please advise. thanks

thanks,

Karunakaran


How to create read-only entity on table with natural key?

$
0
0

As I understand, I can create an entity for exporting data without a natural key required (as insert/update is not used). Is there a good guide on how to do this?

I've found a few guides but none of them work for me. 


The way I have tried to do it is to copy the table I need to the project, create a new field for it and an index with Alternate Key set to true on that field. Then I set the clustered and primary index to the one I created, save, and go create an entity using the copy as a source from the dropdown. I finish the wizard and go to the entity and change the data source back to the original table. Then I delete the copy table, save again and try to build. It gives a bunch of errors:




Alternatively, is there any way to create an entity from SQL Code (SELECT ... join .. etc) ? Or create the view in the AXDB and sync it back to visual studio?


How to pass value from button:clicked to static void main class using x++

$
0
0

Good Day Mam/Sir,

I have a button. I need to get the name of my button then pass it to static void main in class.

Please see below my codes:

Thanks in advance :)

---------------------------------------------------------Start code of Button: Clicked-------------------------------------------------------------------------------------------

void clicked()
{
PurchFormLetter purchFormLetter;

purchFormLetter.parmBtnID(this.name());
super();
}

---------------------------------------------------------End code of Button: Clicked-------------------------------------------------------------------------------------------

---------------------------------------------------------Start code of parmBtnID-------------------------------------------------------------------------------------------

String30 parmBtnID(String30 _btnID = btnID)
{
btnID = _btnID;

return btnID;
}

---------------------------------------------------------End code of parmBtnID-------------------------------------------------------------------------------------------

---------------------------------------------------------Start code of static client void main-------------------------------------------------------------------------------------------

static client void main(Args args)
{
Common record;
int parmEnum;
Object callerForm;
IdentifierName callerFormName;
MenuItemNameAction callerMenuItem;
boolean isProforma;
FormDataSource recordDataSource;
container dataSourceRecordsPacked;
container cachedArgs;
PurchTable purchTable;
boolean recordExists;
Counter numberOfRecords;
str className, methodName;
SysOperationExecutionMode mode;
container packedPurchFormletter;
FormletterOutputContract outputContract;
PurchFormLetter purchFormLetter;
VendPurchOrderJour vendPurchOrderJourOld,vendPurchOrderJourNew;
String30 myID;

if (!args)
{
throw error("@SYS25407");
}
[className, methodName, mode] = FormLetterServiceController::parseServiceInfo(args);
record = args.record();
parmEnum = args.parmEnum();
callerForm = args.caller();
callerMenuItem = args.menuItemName();

if (callerForm)
{
callerFormName = args.caller().name();
}
else if(args.menuItemName() == identifierStr(EPVendInvoice) || args.menuItemName() == identifierStr(EPVendInvoiceVendAdvance))
{
callerFormName = args.name();
}

isProforma = FormLetterServiceController::isMenuItemProforma(args.menuItemName());

if (record && record.dataSource())
{
recordDataSource = record.dataSource();
dataSourceRecordsPacked = FormLetter::getFormRecord(recordDataSource);
}

cachedArgs = [#CachedArgsList];

packedPurchFormletter = PurchFormLetter::mainOnServer(cachedArgs, record, callerForm, dataSourceRecordsPacked);

if (packedPurchFormletter != conNull())
{
purchFormLetter = PurchFormLetter::construct(parmEnum, className, methodName, mode, callerMenuItem);
purchFormLetter.unpack(packedPurchFormletter);
purchFormLetter.init();

purchFormLetter.prePromptModifyData();

if (!purchFormLetter.shouldSkipPrompt() && purchFormLetter.prompt())
{
purchFormLetter.run();
outputContract = purchFormLetter.getOutputContract();
numberOfRecords = outputContract.parmNumberOfOrdersPosted();
}
}

if (numberOfRecords
// <GEERU>
|| (purchFormLetter && purchFormLetter.doRefreshCallerDataSource())
// </GEERU>
)
{
if (callerForm && formHasMethod(callerForm,identifierStr(interCompanyRefreshCache)))
{
callerForm.interCompanyRefreshCache();
}

if (recordDataSource)
{
if (record is PurchTable)
{
purchTable = record as PurchTable;
recordExists = PurchTable::exist(purchTable.PurchId);
}
else
if (record is PurchParmTable)
{
recordExists = false;
}
// <GEERU>
else
if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoRU]) &&
record is VendPackingSlipJour)
{
recordExists = VendPackingSlipJour::findRecId(record.RecId).RecId;
}
else if (record is EGAISWaybillJour_RU)
{
recordExists = EGAISWaybillJour_RU::findRecId(record.RecId).RecId;
}
// </GEERU>
// <GEEPL>
else if (record is PlSADTable)
{
recordExists = PlSADTable::findRecId(record.RecId).RecId;
}
// </GEEPL>
FormLetter::reFreshCallerDataSource(recordDataSource,
recordExists,
(numberOfRecords > 1));


myID=purchFormLetter.parmBtnID();
info(strfmt("my BTN name is: ",myID));

/*
//-------------------------------------Start of Old VendPurchOrderJour------------------------------------------------------------
select firstOnly vendPurchOrderJourOld order by vendPurchOrderJourOld.RecId asc
where vendPurchOrderJourOld.PurchId == purchTable.PurchId ;
//-------------------------------------End of Old VendPurchOrderJour------------------------------------------------------------

if(vendPurchOrderJourOld.PurchId)
{

ttsBegin;
select forupdate vendPurchOrderJourNew order by vendPurchOrderJourNew.RecId desc
where vendPurchOrderJourNew.PurchId == purchTable.PurchId ;
vendPurchOrderJourNew.PurchaseOrderIdOld = vendPurchOrderJourNew.PurchaseOrderId;
vendPurchOrderJourNew.PurchaseOrderId=vendPurchOrderJourOld.PurchaseOrderId;
vendPurchOrderJourNew.update();
ttsCommit;

}

*/
}
}
}

---------------------------------------------------------End code of static client void main-------------------------------------------------------------------------------------------

How to count the certain records.

$
0
0

Hi Guys,

I am having the field called "Nationality Country Region" which is the string field ,i need to take the count of it.

For example

Nationality field containing the value - "SAU" ,"IND",etc...

If i have 4 "SAU" in my table my count should be displayed as "4" , and if i have 3 "IND"  it should be displayed  as "3".

Purchasing Policy - Account Category Matching Override.

$
0
0

Hi 

My AP Parameters are set to 3-way matching, with 'Require Approval', I have created a Purchasing Policy for a particular Procurement Category to not require matching.

When i create the PO, do the product receipt, and then generate the invoice, i add a line to the invoice with the procurement category mentioned above. But when i click 'Update Match Status' it still says Failed (and on the line 'Not Performed')

Is there something I am doing wrong?

(i posted this on the D365 forum, but nobody has replied)

AX and F&O forum split

$
0
0

When you have a question about a generic D365FO feature, where should you ask? Or where shall I look for older discussions about my topic? Many users seems to be asking the same question without getting an answer.

For instance, what if I have a question about development or document management in F&O. Shall I ask in D365 Finance forum? It's not really about Finance. D365 Supply Chain Management? It's not specifically about Supply Chain Management either. In Dynamics 365 General forum? It's so overloaded - D365 means too many thing to be meaningful, and people use it mainly for CRM. In Dynamics AX forum? Well, the product it's not Dynamics AX anymore.

It seems that more people will now choose the last option, with Dynamics AX (current version) as the version tag, because other alternatives look even worse. We probably shouldn't have wasted time learning them to use F&O forum (and moving F&O related questions there) and we should go back to using AX forum as a forum for generic AX/F&O/F/SCM features...

Administrators, what was your plan when you decided and implemented these changes? Where shall we discuss such topics? Do you think we have the right number of forums with the right names?

Or is all about following branding regardless of the impact on user experience? Are you sure that the priorities are set correctly?

As a workaround at making things at least a bit manageable, can you give us a way to combine several forums to a single view (and search experience)? We would still have to pick forum when we ask, even if none is suitable, but at least we would be able to check all F&O forums at once. If there is no reasonable separation of forums, the same topic can end up in any of them, and finding it means searching all of them. It's a horrible thing for usefulness of this site.

Viewing all 17532 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>