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

no metadata class defined for data contract object in d365 using Sysoperation

$
0
0

I'm getting this error:

no metadata class defined for data contract object

these are my classes:

> no metadata class defined for data contract object



**CustBalanceController**

    class CustBalanceController extends
    SysOperationServiceController
    {
    
        public static void main(Args _args)
        {
            CustBalanceController controller = new CustBalanceController(classStr(CustBalanceService),methodStr(CustBalanceService,processData),SysOperationExecutionMode::Synchronous);
            controller.parmArgs(_args);
            controller.startOperation();
        }
    
    }

**CustBalanceUIBuilder**

    class CustBalanceUIBuilder extends
    SysOperationUIBuilder
    {
        public DialogField dlgCountry;
        public CustBalanceController custBalanceController;
    
        [Hookable(false)]
        public void build()
        {
            super();
    
            Dialog dialogLocal = dialog as Dialog;
    
            dlgCountry = dialogLocal.addField(extendedTypeStr(LogisticsAddressCountryRegionId));
        }
    
        [Hookable(false)]
        public void postRun()
        {
            super();
    
            
        }
    
        [Hookable(false)]
        public void getFromDialog()
        {
           
        }
    
        private CustBalanceController getContract()
        {
            if (custBalanceController == null)
            {
                custBalanceController = this.dataContractObject() as CustBalanceController;
            }
    
            return custBalanceController;
        }
    
    }

**CustBalanceDataContract** 

    class CustBalanceDataContract implements SysOperationValidatable
    {
        TransDate transDate;
        str packedQuery;
       CustBalanceUIBuilder custBalanceUIBuilder;
    
    
    
        public boolean validate()
        {
            boolean isValid  = true;
    
    
            // Perform any validation nessecary.
            if (custBalanceUIBuilder.dlgCountry.value() == "")
            {
                isValid = checkFailed("Scegli un Paese");
            }
            return isValid;
        }
        [DataMemberAttribute,
            AifQueryTypeAttribute
            ('_packedQuery', querystr(CustTable))
            ]
            public str parmQuery(str _packedQuery = packedQuery)
        {
            packedQuery = _packedQuery;
            return packedQuery;
        }
        public QueryRun getQuery()
        {
            return  new QueryRun(queryStr(QueryAccountNum));
        }
        public void setQuery(Query _query)
        {
            packedQuery = SysOperationHelper::base64Encode(_query.pack());
        }
    }

**CustBalanceService**

    class CustBalanceService
    {
        LogisticsAddressCountryRegionId countryRegionId;
        SalesTable salesTable;
        [SysEntryPointAttribute]
        public void processData(CustBalanceDataContract _custBalanceDataContract)
        {
            QueryRun queryRun;
            CustTable custTable;
            //create a new queryrun object
            queryRun = new queryRun(_custBalanceDataContract.getQuery());
            // loop all results from the query
            while (queryRun.next())
            {
                salesTable = queryRun.get(tablenum(SalesTable));
                custTable = salesTable.custTable_CustAccount();
                if(custTable.countryRegionId() == countryRegionId)
                {
                    //gli aggiornamenti e le scritture sul db varnno messe dentro ttsbegin e ttscommit
                    ttsBegin;
                    select forUpdate salesTable
                           join Custtable
                             where salesTable.CustAccount == custTable.AccountNum;
                    salesTable.IDNar = custTable.idNar;
                    salesTable.update();
                    ttscommit;
                }
            }
        }
    
    }

i'm debugging, but i can't figure out. Any helps?

i'm debugging, but i can't figure out. Any helps?


QueryRun could not be created in sysoperation framework

$
0
0

class CustBalanceService
{
    LogisticsAddressCountryRegionId countryRegionId;
    SalesTable salesTable;
    [SysEntryPointAttribute]
    public void processData(CustBalanceDataContract _custBalanceDataContract)
    {
        QueryRun queryRun;
        CustTable custTable;
        //create a new queryrun object
        queryRun = new queryRun(queryStr(QueryAccountNum));
        // loop all results from the query
        while (queryRun.next())
        {
            salesTable = queryRun.get(tablenum(SalesTable));
            custTable = salesTable.custTable_CustAccount();
            if(custTable.countryRegionId() == countryRegionId)
            {
                ttsBegin;
                select forUpdate salesTable
                       join Custtable
                         where salesTable.CustAccount == custTable.AccountNum;
                salesTable.IDNar = custTable.idNar;
                salesTable.update();
                ttscommit;
            }
        }
    }

}

what's wrong with this  code?

Create and Update financial dimensions through X++

$
0
0

I need to create and update financial dimension through excels. Can anyone please share the Code for the same (AX2012 - X++)

which Class insert data in VendReceiptsListJour

$
0
0

Hello everyone,

I want to auto populate custom field from PO packing list to packing list in journal (VendReceiptsListJour table), could any one tell me which class insert data in VendReceiptsListJour table.

add a specific field of table in a dialog field

$
0
0

i want to add the field TimeZone of table LogisticsAddressCountryRegion to a dialogField

dialogFieldCheck = dialogLocal.addField(attributeStr(LogisticsAddressCountryRegion.TimeZone));

but i'm catching an exception on runtime:

No enum value of types matching logistigsAddressCountryRegion.TimeZone is found

what's wrong?

Creating a verification on endjob in productionfinish

$
0
0

Hello, I need help with my task. I need to verify if all products in BOM are ready to report as finished.

The solution that im thinking is to verify if all sub tasks of the main task are marked. 

So I need enable or disable the endjob on the statement result.

Im all new in this so I appreciate all help.

Actually im trying to disable edit value on this field if condition is false.

public class ProdParmReportFinishedVerify
{

   ProdParmReportFinished ProdParmReportFinished;
   ProdTable ProdTable;
 

          
   public void run()
   {
    

        {while select ProdId, ProdStatus, InventRefType, InventRefID from ProdTable where  
            InventRefType::CRMQuotation && InventRefType::FixedAsset && InventRefType::InventJournal&& InventRefType::InventTransfer && InventRefType::ProdLine && InventRefType::Production&& InventRefType::Purch && InventRefType::Sales 
            if(ProdStatus::ReportedFinished)
        {
            ProdParmReportFinished.EndJob = NoYes::Yes;
            ProdParmReportFinished_EndJob.allowedit(false);
          info(' Success');
        }
        else
            {
                ProdParmReportFinished.EndJob = NoYes::No;
                info(' Failed verification');
            }
        }


        }

}

Get cross company data from D365FO to power apps.

$
0
0

Hello All,

My requirement is to create a simple canvas app(in Power App) in order to display the customer details as a list and details view, where the user can able to do the basic CRUD operations.

I have created a app with Dynamics 365FO as a connection and added a data source to my list screen. By default it is displaying the data from the company which is assigned to a user as default company in D365fo.

For example if a user has default company has USMF then the list displays data from that company.

Please look into the steps in which I have created the app in the following screenshots.

Step 1:

Step 2:

I have selected D365FO as a connection and also selected Customers entity as my datasource.

Step 3.

With the given datasource Power app will create a app like the following.

In the above image the data getting displayed in the list are coming from the customer entity.

The data is getting filtered based on the default company of the user.

Is there a way to pull data from multiple company into Power Apps. Please suggest.

Create Power App for the Workflow approval process.

$
0
0

Hello All,

My requirement is to create a Power App for the users to approve,submit or deny the workflow from Dynamics 365FO.

Is there a way to configure the workflow process(standard workflow process like sales or purchase) of D365FO into Power Apps so that the user can able to approve or do the remaining operations in mobile itself.

Thanks in Advance!


Fetch a field value from the current active record in a form

$
0
0

Hi,

I am trying to fetch the item id of the current record from the released products form. Can anyone please help me regarding how do I achieve the same?

Posted project transactions - when invoiced lines don't create entries in all the necessary ledger accounts all the time.

$
0
0

Hello,

   We have some odd scenario. When lines are invoiced  (project management and Accounting - Common\Transactions\Posted project transactions screen) the journal entries are not created for all the ledger accounts. This happens only to some transactions but not all of them with the same projid and the same category. For the same project and the for the Category they posting to the general ledger are different. I have tried to debug but couldn't find anything related to ledger entries during the invoice proposal. For instance here are the couple of screen shots of the Voucher transactions of two different trasactions for the same project and for the same category. Please see the two voucher transactions TRN-008359067 (for $418) and the TRN-008847845 (for $260)

For the TRN-008847845 two ledger entries 11050-CA-006-0607-033166-CA that would have -260 and the 58019-CA-006-0607-033166-CA account that would have a $260 are missing compared to the TRN-008359067  voucher transactions. 

Is there a specific place that I can look at? I am not sure if this is configurational issue. Can you please shed some light?

Version : AX 2012 RTM

Thanks,

Dave

Add a field to a group whose data source is another table

$
0
0

I have a standard form with standard table. This form has a group whose data source is the standard table InventTable. Now I need to add a field to this particular group in the form from my custom table. However I can not do it since the data source is mentioned and standard types are not modifiable. How can I achieve this. Please help me here.

How to access field in Datagroup without changing its AutoDatagroup property

$
0
0

Hi

In onHand form i need to show warning when Batch number field is not displayed in grid when I click a button

Use data contract report parameter in a different class

$
0
0

Hi All,

Here's my query : I have a data contract class where there is a parameter : AgingPeriodSet

I need to use that parameter in another class namely ReportLines class which is not a DP class.

How would I use the contract class in the ReportLines class, in order to get the value passed in the report parameter for AgingPeriodSet.

I need to use AgingPeriodSet value in a select query to fetch records.

PS: This has to be done in Dynamics 365 for Finance and Operations and all the objects that I have mentioned above are customised objects.

Please help!

Thanks:)

Roshni Sujay

Error while generating Financial dimension report

$
0
0

Hi All,

When I am generating a customised report by the name of 'Sales by Financial Dimension' report in AX 2012, I am encountering an error:

"Function DimensionStorage.getSegmentForHierarchy has been incorrectly called"

This function has been used in the DP class of the report - The DP class is using a query which involves GeneralAccountEntry and GeneralEntry as the data sources.

Any idea as to what might be causing the above error?

Your help and guidance is highly appreciated!

Thanks :)

Roshni Sujay

Modify Customer Payment Journal Report

$
0
0

Hi Experts,

Hope you guys are doing great!

I would like to adjust Cust payment journal report size to landscape and I need to add Grand total field.

As per standard AX, retain the functionality of being able to run this report before or after the journal is posted.

So where can I go there to find that report, how can I  adjust the size and add field to that report?

I really appreciate your quick response.

Thanks. 


Check if a field is created or updated

$
0
0

Hi,

I have a form where I can create/ update a record, and based on this action I need to update the record in another form which stores the Primary Key of the initial form and whether the field is updated or created. I am new to D365 F&O and not sure which functions/ code to use here. Can anyone please help me out?

Thanks

how to enable/disable button on list page without interaction class in d365?

$
0
0

Hi all, 

I hav a custom list page in which I need to enable/disable two buttons in action pane based on status field. 

But the list page doesn't hav any interaction class. 

How can I achieve this? Please suggest

Some sample customizations or modifications required.

$
0
0

My dear Axaptians. I hope you guys are doing well. I need a small help from my fellow axaptians. I am searching for some example customisations or functionalities in ax 2012 or D365 FO, for enhancing my concepts. If you guys might have worked on any customisations where you got to learn something new. Or perhaps where you got to customise some standard functionality of AX, then please be kind to share. You can also share a link here if you might have already written a blog about it somewhere. This is just a fellow technical axaptian trying to sharpen my knowledge about the tool. Thanks so much in advance.

AOS Name in status bar doesnt appear while checkbox set in user info

$
0
0

Hello,

AOS Name doesnt appear in status bar while 'Status AOS Name' checkbox is set to yes in user parameters for some users in DAX, aos name is set as instance name in server configuration, but for some users which i use - they do appear, only doesnt appear for client users, why it might be happening ?

Batch out - Create Business Event

$
0
0

Hi,

I have a requirement wherein I am supposed to create a business event for Batch out whenever export= yes and batch no = incorrect value. Now, from functional point of view I am not sure where is this batch out and the export and batch no fields available. Could someone please help me out here?

Viewing all 3285 articles
Browse latest View live