Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all 73760 articles
Browse latest View live

Unable to fetch the data for all the columns when using group by clause

$
0
0

Hi All,

I have a scenario where in i need to get the distinct record from a table. If i use 'group by' clause, then i need to select the columns which i'm using in the group by clause. 

Ex--

Table Table1;

while select Voucher, RecId from Table1 group by Table1 .Voucher
{

}

I need to group by only on Vouchers and not with RecId. But if i dont pass RecId to group by clause, the query doesn't gives the expected results. My requirement is to get the RecId and Voucher from the query on grouping by vouchers only. How do i achieve this?


Enable / Disable fields in a Form

$
0
0

Hi Guys, 

I have created a form where i need to enable / Disable some fields based on some conditions. Can someone clarify the below.?

I have two fields in a table called TestTable

Field A( Checkbox  No/Yes), Field B (String). field B should be active for editing only if the Field A is selected

I set is as shown below,  In the Form i added a SetfieldAccess method 

public void setFieldAccess()
{

TestTable.object(fieldNum(TestTable, FieldB)).allowEdit(False);

if(TestTable.FieldA == NoYes:: Yes)

{

TestTable.object(fieldNum(TestTable, FieldB)).allowEdit(True);

}

TestTable_ds.refresh();

}

and in the active method of the data source 

public int active()
{
int ret;

element.setFieldAccess();

return ret;
}

1. My problem here is whenever I selected the checkbox I need to either refresh the form or click on the field B or anywhere in the form to enable the field B active. its not refreshing automatically. how can I do that ? 

2. Is above the proper way to set fields enable or disable in a form ?

lookup for customer Address

$
0
0

Hello Guys,

I have a form where I have the field customer account number. I need to list the cities as a lookup for an another field in the same form. I did below for it. 

public void lookup(FormControl _formControl, str _filterStr)
{
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildDataSource QbdsJoin;

SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(LogisticsPostalAddress), _formControl);
;


qbds= query.addDataSource(tableNum(LogisticsPostalAddress));
qbds.orderMode(OrderMode::GroupBy);
qbds.addGroupByField(fieldnum(LogisticsPostalAddress, City));
qbds.addRange(fieldNum(LogisticsPostalAddress, City),SortOrder::Ascending);
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(LogisticsPostalAddress, City));
sysTableLookup.performFormLookup();
}

Now I need to list only the cities related to that particular customer account number. how can i do it.?

Thanks in advance.  

D365 How to join 2 datasource in a form using X++

$
0
0

Hi,

I have created one form and just added two different datasource A & B.

I dont setup any properties in data sources.

Now i want to link both data-Sources in form by writing X++ code  

Ax2012 XDS Security issue.

$
0
0

Problem: I want to set XDS Query in such a way that when it found zero rows it should return all possible values.

Details:

I got a requirement to have a single security Role to work with multiple security policies. 

Each policy got an especial column in custom security table from where it gets its parameters for XDS Query. Custom security table is a custom table which is like matrics to assign different warehouse, itemgroup etc to different users

Till now everything working fine. Now the client wants that if now warehouse is assigned to a user all warehouse data should be shown instead of no data. 

Is there any way I can achieve this by changing the XDS query to get all the record if no warehouse or itemgroup is assigned in the security table.

Delete action in D365FO

$
0
0

Dear All,

I have created 2 Tables like Parent Table ( Student details ) and Child Table ( Mark details )

Student details : 

Fields > Student Id, Name

Mark details :

Fields > Student Id, Marks, Division, ClassStnd

Then I set Delete action on Child Table ( Mark details ) ****

Properties :

Action = Cascade

Then I create a records in Parent Table ( Student details ) and Child Table ( Mark details )

Student details :

Mark details :

Now I am going to delete record form Parent table ( Student details )

Student Id = "S001"

Then browse Child Table ( Mark details )

here I saw Student Id = S001 in Child table ( Mark details) still exist even student id  = S001 deleted in Parent Table ( Student Table)

Now again I create a new record in Student Table

Student Id = S001

Now I deleted record form Child Table ( Mark details)

then browse Parent Table ( Student details )

Here we saw Student Id = S001 is not there in Parent Table because we deleted Student Id = S001 from Child Table.

My Question is :

1. Is it always mandatory to set delete action in Child table.

2. In Parent Table (Student details ) can I mention delete action for Child Table ( Mark details) ?

Please give me more shed on this.

Thanks!

CREATING API ENDPOINTS FROM D365 FOR FINANCE AND OPERATION

$
0
0

Good day all,

I am saddled with the responsibility of creating an endpoint in dynamics that will enable another solution provider to post some records from its own application into dynamics.

I know that i can create and expose through data entity but the format of his json values is as follows:

{
EmployeeId : “”, EmployeeNumber: “”,Surname : “”,OtherNames : “”,Email: “”,PersonalEmail: “”,Gender : “”,ManagerId : “”,Manager2Id : “”,


JobTitle: {Id: “”,Name : “"},
JobLevel: {Id: “”,Name : “"},
Department: {Id: “”,Name : “"},
Unit : {Id: “”,Name : “"},
CompanyLocation :
{Id: “”,Name : “”,
Location : {Id : “”,Name: “”}
},
BirthDay : “” // date (yyyy/mm/dd),
Phone : “”,
Address : “”,
DateHired : “” // date (yyyy/mm/dd),
ExitDate: “” // date (yyyy/mm/dd),
ExitType : “"
}

So data entity creation that will accept this kind of values is what i do not know how to do. Also I will like to know if there's a way i can expose a method just like the normal C# web API method that can assist me to be able to get this values into D365 and manipulate to suite my needs. Thanks

query.get(tableNum(TempTable)) is not working

$
0
0

Hi All,

I'm joining TempDB type table(Temptable) to an existing datasource(GeneralJournalEntry) using query classes through code. (Temptable is inner joined to Regular table).

while(query.next())
{
Temptable tmptable = query.get(tableNum(Temptable)); 
GeneralJournalEntry entry = query.get(tablenum(GeneralJournalEntry));

}

tmptable is not getting any records whereas entry is.

What is wrong here?


Cash Discount Percentage on View Totals Form

$
0
0

Hi All,

I have a requirement where the client does not wants to cash discount percentage be applied on the freight charges instead to be applicable on the actual amount alone.

How could this can be achieved ?. Which logic has to be modified, please give some suggestions?

Regards,

Mania

Consistency check - Inventory managment in x++ job

$
0
0

Hello,
Can anybody tell me how can i run this functionality through x ++ (job).
Consistency check :
Module: Inventory Managment
Check/Fix : fix

"Item"

Deploying customised webservice to multiple instances

$
0
0

I am developing third party software I want to integrate with Dynamics AX. I understand D365 won't allow Production access to the DB (Booooo!)

At present the best alternative looks to use a mixture of out of the box AIF web services and some custom web services.

My question is around the best \ easiest way to deploy these web services. If I have x amount of customers, setting up services manually for each one would be tedious and time consuming. Deploying via an executable setup package would be a lot easier.

Is this to deploy custom AIF webservices in this way? If not what are the options for efficient\automated deployment of the same service across different client instances. Im assuming that the Dynamics Ax AIF webservice feature has already been installed.

Segmented Entry Control

$
0
0

My users are having trouble when entering the GL account and dimensions in Vendor Invoice batches lines (LedgerJournalTransVendInvoice) because they lose their place while tabbing through the dimensions since they have eight dimensions plus the main account.  Yes they can Alt + Up Arrow to show the display each time they enter the field.  But when they are entering an invoice with hundreds of lines of distribution that can be a ton of extra key strokes.  My question is:  Is there a way or property that can be envoked to always turn on the ContextFlyout display when a user enters the field?  If so can the display be programmatically changed to only show when the account type equals Ledger?

Error when trying to copy a Purchase Order

$
0
0

Hi:

I used the live environment to update the backup environment.

So far things look OK in the Text environment but we are now seeing the following error when trying to retrieve a copy of the Purchase Order.

The request failed with the error message

<HTML><BODY><H1>301 Moved Permanently<H1><BODY><HTML>.

Any idea what caused this error as I would appreciate some assistance in resolving this?

Steve

Error during Firming of Planned Production Orders generated by MRP- Item Number Does Not Exist

$
0
0

When trying to firm planned production orders we are getting errors on some items. The error is "Item Number Does Not Exist"

We can manually create production orders for the same items and the items have existed in the system for quite some time.

Any ideas? Thanks in advance.

David

AX 2012 CustAccountStatementExt is not sent as attachement for few customers

$
0
0

Hi All,

I have a tricky issue. I have Two customers for who i can generate in screen a CustAccountStatementExt report.

If i try to send them by email directly from AX, for one of them the report is never attached but i can not understand why ?

So the customer receive the mail but without the report.

I am searching for understand what can be the root cause of this unexpected behavior?

Could you please help me ?


Project timesheet Project - cost posting type

$
0
0

Hi,

When I enter the timesheet in project accounting, after being approved and posted I see my voucher with 2 posting types:

Project - cost and Project - payroll allocation

I have around 4 different financial dimensions 

When the timesheet line is entered, I check the financial dimension and make sure that all of them are posted.

When I check the voucher that has been posted, the Project - payroll allocation posting type had inherited all 4 financial dimensions from the timesheet line - financial dim

However checking the  Project - cost I see that only 2 financial dim have been filled.

What is the logic or hierarchy of search on fin dimension for the posting type 'Project - cost'?

Thanks

Sam

purchased request workflow review task doesn't appear

$
0
0

currently i am working to implement purchased request to our system.

workflow is created, and request is submitted to the work flow, but the problem is reviewing and approval tasks doesn't appear in task list to apply approval or reviewing.

regards,

Ramy Emad.

I cannot see the workflow values

$
0
0

I created a workflow, set the values, but when I reopen the workflow I cannot see the values that I filled. Other user can see the values, but I cannot. I reset my usage data and do not solved the issue. My user, in AX, was deleted and recreated, but the issue do not solved yet. How can I solve this issue?

Thank you!

How to handle discount amount?

$
0
0

We are the end user, not the re-seller. We are receiving discount from the vendor. But that discount amount should not be captured in the discount ledger instead it should be captured in the same item ledger account.

We tried to change the discount ledger in the distribution amount, but it is working only for non stock items not for stocked items. Even I am not sure distribution amount is the correct choice for this scenario.

Thanks.

Is that possible to run the RPOS in Android tab?

$
0
0

We are currently using dynamic AX 2012 R3 and RPOS .To improve the customer service and reduce a space constrain to place typical pos machine we like to transform to handheld device

So some one can help me to understand is there any possibility to integrate with Android based device .if yes, please brief those info

Thanks in advance

Viewing all 73760 articles
Browse latest View live


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