Quantcast
Channel: Developer Forum - Recent Threads
Viewing all 3285 articles
Browse latest View live

How to firm planned purchase orders through X++ in D365?

$
0
0

I want to create a batch job to firm the planned purchase orders through X++. if the planned order has some same fields, they will be in the one purchase order. does anyone can help me ?


receive mail in ax

$
0
0

how to receive mail and save attachment into ax tables .

if anyone have sample xpo file please send 

AllowCrossCompany property of an AOT query and still addCompanyRange() is not working

$
0
0

Hi,

   I am making some changes to the Customer aging report (AR/Reports/Status) . The request is to be able to see the cross company results. I did the below steps and it doesn't seem like adding the companies to the CustAgingReport query. 

1) Changed the AllowCrossCompany property of the CustAgingReport to "Yes"

2). With the above change I do see the 'Conpany Range'  tab in the Select query wizard screen when clicked on the Select button is clicked on. I am able to select the companies that I would like to search in

3).  Created a new method in the CustAgingReportDP class to add the selected companies to the query. Below is the code

private void masAddCompanyRange(Query _query)
{
    container                companies = this.parmQuery().getCompanyRange();
    int                      i;
    DataAreaId               companyLocal;
     QueryBuildDataSource    qbdsLocal;
    //_query.allowCrossCompany(this.parmQuery().allowCrossCompany());
    _query.allowCrossCompany(true);
    qbdsLocal = _query.dataSourceTable(tableNum(CustTable));
    for (i=1;i<=conLen(companies);i++)
    {
        if(conPeek(conPeek(companies, i), 2))
        {
            info(strFmt('1%',conPeek(conPeek(companies,i), 1)));
            companyLocal = conPeek(conPeek(companies,i), 1);
            _query.addCompanyRange(companyLocal);
            //_query.dataSourceName('CustTable').addRange(fieldnum(CustTable,DataAreaId)).value(queryvalue(companyLocal));
        }
    }
    this.parmQuery(_query);
}

but while debugging when I look at the query text I don't see the range has been added to it. The query looks like this 

SELECT * FROM CustTable(CustTable) WHERE ((AccountNum = N'468057' OR AccountNum = N'407178')) AND ((CustGroup = N'20'))

4). I have tried using the line of code 

      _query.dataSourceName('CustTable').addRange(fieldnum(CustTable,DataAreaId)).value(queryvalue(companyLocal)); and it does the range but at the end it is throwing the below error

"Filtering at the data source level is not allowed for a cross-company query."

Am I missing something? 

Thanks,

Dave

    

Duplicate records are inserting by using insert_recordset

$
0
0

Hi, Everyone.

I have a condition, Which are records are not in the table2 in table1 those things only could be inserted

Initally Table2 does not have any records, so I ran the job it works as fine after that I have update one more records in table1 and again I ran the job its getting duplicat records

Please find screenshots fyi, kindly suggest where I am deviated ... 

Occur duplicate records:

Thanks in advance,

How to increse Date for comparing

$
0
0
Can somebody help me with this ? I need that rows get a different colour if 2 years have passed since inserted Date. But I don't know how to increase my data field by 2 years for this



public void displayOption(Common _record, FormRowDisplayOption _options)
    {
        dbContacts _dbContacts;;
        _dbContacts = _record;


        if(_record.(fieldnum(dbContacts,DDataWydania))  == systemDateGet())
          //  DDataWydania + 2 years > Currentdate
        {
            _options.backColor(WinAPI::RGB2int(127,255,0));
           // _options.colorOnSelectedRow(WinApi::RGB2int(64,128,128)); 
        }


       super(_record, _options);
    }

How to get the entry points of a privilege in D365FO using x++ code.

$
0
0

As in the AX 2012 we dont have the SecurityTaskEntryPoint table in D365 FO to get the entrypoints of a privilege. Can anyone Suggest me how to get entry points related to a privilege using x++ code..in D365FO

Packing Material cost

$
0
0

HI,

IN the Finished Goods BOM, the packing material should be added wiht Zero cost

While generating the BOM for the finihsed goods , the packing material should be wiht zero cost

SalesTable header line view switch performance

$
0
0

Hi,

Problem:

performance issue when user switch SalesTable form from default Header to Line view. I made a lot of measurements and it takes from 1 up to 55 seconds depends on user. Issue is only noticed  when user switch it 1st time on opened form. Then form could be switched line<>header view without issues. When form is closed and opened again issue can be experienced again or not. No rule on that. 

What was tried:

I tried to improve it customizing the code in run()  method using:

1.

task(1320); -> initial switch to header view by code. once it done on form initialization than no more issues for user when it's fully opened. It was slightly better, bud still not acceptable and similar times were experienced;

2. then changed again to 

headerView.activatePage(); -> equivalent to task(1320) but working faster, however users still experience serious issues. 

Questions:

1. do you experience the same?

2. Any ideas/ experience with that performance issue?

 


how to get filtered multilookup it based another one multilookup, in dynamically in ax2012

$
0
0

In My Form i have two string control (Site and Warehouse).In my string control i had written code for multiselect lookup using Syslookupmultiselectctrl class.Then  when i select the Sites in the site control, i will get the Site values from the site control in the warehouse lookup method and i will filter the corresponded warehouse values in Warehouse control. I had placed breakpoint at Warehouse control lookup method. When i choose the site and then when i click the warehouse Control the lookup method method hits at breakpoint. Then after when i changed the site values in Site control , and then when i click the Warehouse control the lookup method for that warehouse control was not hitting at breakpoint. Then i commented the Syslookupmultiselectctrl class line in the warehouse lookup method code, it hits the breakpoint everytime when i click the warehouse control. Why the lookupmethod in warehouse control is not called at second time.So, instead of using Syslookupmultiselectctrl class , is there any other solutions to achieve the multiselect lookup. if second time lookup method is call,my problem is solved. any idea about this

Entry points for secuirty privilege in D365 FO

Azure Active directory applications in system Administration module.

$
0
0

Hello All,

I have registered a custom mobile app in azure, and the mobile app integrates with AX for data. My doubt is do I have to give a system administrator role for the users to access the data from AX or only system user is fine?

could anyone please let me know what exactly is the use of this form in d365fo, 

Thanks!

Enable Show Attachment Status for All Users

$
0
0

Hi Guys,

Hope you are doing great!

I Need to write a job that can be run to update User fields 

The following updates need to occur:

The job that needs to be written needs to populate the checkbox for the 2 options indicated.

Once the job is written, it will need to be run to make the changes.

Thanks.

Function BudgetControlTrackingUpdate.returnRemainingFunds has been incorrectly called.An error occurred during update

$
0
0

Hi, All.

When i click confirm button to confirm the purchase order, i get below order.

 Function BudgetControlTrackingUpdate.returnRemainingFunds has been incorrectly called.

An error occurred during update.

This is not happening to all purchase order.

Anyone faced this issue before?

Thanks.

BYOD. Exporting Entities to SQL Azure database Can anyone share tips?

$
0
0

I am new to this forum so please be kind :-)

We are using BYOD and exporting entities to SQL azure database and have found it difficult to identify the entities we need for specific fields.

Also how to find descriptions for things for example PURCHASEORDERSTATUS has values 1,2,3,4 where do we find the description?

We are bringing the data into our on prem information platform and using Power BI for reporting....

If anyone can share some tips that would be great

How to retrieve the entry points associated to a privilege which created in the D365 FO(System Administration -->Security-->Security configuration)


Field doesnt appear in Reference group control - reference field

The outstanding balance that were subject to Low Balance are included in the new invoice as a balance brought forward in D365 F&O

$
0
0

I have a requirement where if customer balance is less than or equal to a threshold amount then customer will be set up with a flag Low Balance. Whenever a new invoice getting generate for the customer I have to include existing balance amount in the new invoice as a balance brought forward. I have to add this existing balance amount to the new invoice amount. I have tried creating a COC for the createJournalLines() method in SalesInvoiceJournalCreateBase class but it does not allow me fetch buffer for the custinvoicetrans table to the coc code. How can I achieve the same in D365 F&O.

Along with this I have to maintain customer balance with correct amount as after posting the invoice amount will automatically add up in the customer balance. Hence, it will add the balance amount which I want to add with customer invoice + Invoice amount + existing balance amount. For this I should create a credit not or reverse general journal to maintain correct customer balance amount.

Any suggestions would be greatly appreciated. Thanks in advance.

Cannot create a record in Inventory transaction originator (InventTransOrigin). Reference: Weighted average inventory closing. The record already exists.

$
0
0

Dear all,

When i am closing in invenory ,i am getting this error. 

inventory mgmt->periodic->closing and adjustment-> close procedure->close.

its inventcostclosing class i came to know for closing process.

Not aware of the process actually, can anyone please give suggestions on how to proceed/resolve further

Clear records from table

$
0
0

when if condition fails i want to clear all records from the form 

please give me any example

Customizing a text field to accept only alphanumeric value.

$
0
0

Hi,

I have a requirement to accept only alphanumeric values for a field in a from in D365 F&O. However I am unable to do it. Can anyone please help me achieve this. Also where should I be performing the change ie edt/table/form? 

Viewing all 3285 articles
Browse latest View live