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

Show HcmJob.JobId in AOT Views using AOT Queries

$
0
0

Hi there,

I came across a problem, can anyone help me in this regard,

I have created a View say “WorkerRoleView” and Queries say “WorkerRoleQuery."

I want to show HcmWorker.Person and worker last job - HcmJob.JobId  in the AOT WorkerRoleView without using any methods only using AOT WorkerRoleQuery the result should be for example 5637141234    BI consultant.

The issue that I have is that the worker can have more than one JobId, and I want to show only their last jobId.

I believe that the sudocode should be like Select worker,   Group by HcmWorker.Person ,order by HcmJob. RecId Desc.

Right now, I have for the same worker multiple JobID.

I am new in AX, and right now, I cannot find where I made mistake and step by step how to fix it.

Right now, I have for the same worker multiple JobID and I need one worker one jobId. 

Thank you.


Create a Data Entity for a Table That References Itself

$
0
0

I have a table that contains a hierarchy of parent and child records.

ItemField (string 64)
ParentId (refRecId)
RecId (recId)

Attempting to create a data entity on this table returns an error:  "The natural key for the table has a circular reference."

I believe it is possible to create an entity on a self-referencing table, (CustTable.InvoiceAccount references back to itself, and Dynamics releases with a data entity on that table).

Any suggestions?

Thanks,

- Brad

Batch Job class in D365 for Operations

$
0
0

System Information:

VM Locally hosted -> D365 for Operations, Platform Update 3 Version: 7.0.4307.16141

Requirement:

Create a batch class which system need to run regularly as a batch job.  

Issue:

When I click on the Menu item button, I am able to add it to the Batch job bucket (message: The Fetch Data is added to the batch queue.) but it will remain in “waiting” state forever. If run it without batch class logic executed without any issue.

Am I missing anything or doing something wrong? Thanks in Advance.

Task Completed:

  1. Cross check that server is under the “Selected Server” section of Batch group form ( System administration -> Setup->Batch group), it is showing “Batch: ServerName”
  2. Create a Class “BatchTest”  and extend it from the RunBaseBatch.
  3. Override the canGoBatch,runsImpersonated, caption, Pack and unpack method.
  4. Create a method ‘processRecords’which is having actual logic.
  5. Create Action type menu item with following property set:
    1. ObjectType - Class
    2. Object - SysOperationServiceController
    3. EnumTypeParameter - SysOperationExecutionMode
    4. EnumParameter - Synchronous
    5. Parameters - BatchTest.processRecords

Class Code:

class BatchTest extends RunBaseBatch

{

    #DEFINE.CurrentVersion(1)

    [SysEntryPointAttribute(false)]

    public void processRecords()

    {

        // actuall Logic

    }

    public container pack()

    {

        return [#CurrentVersion];

    }

    public boolean unpack(container packedClass)

    {

        //Deserializes the packedClass parameter value to an instance of the RunBase class.

    boolean         isSuccessful;

        Version         version = RunBase::getVersion(packedClass);

        container       base;

        ;

        switch (version)

        {

            case #CurrentVersion:

            {

                [version, base] = packedClass;

                isSuccessful = true;

                break;

            }

        default :

            return false;

        }

        return isSuccessful;

    }

    public boolean runsImpersonated()

    {

        return true;

    }

    public ClassDescription caption()

    {

        return 'Fetch Data';

    }

    public boolean canGoBatch()

    {

        return true;

    }

}

how importing data from excel to ax 2012?

$
0
0

I have to import the employee master from excel.During importing it is asking to fill sheet lookup what I have to fill here? please give me suggestions.

How to print ssrs report from X++

$
0
0

Hi I have writen code for to print to pdf so i am stuck in printing to printer directly here is the code i have written

private void addToQueue(container _licensePlates)
{
int conLength, cnt;
WHSLicensePlateParent licensePlateID;
WHSWorkMHUSummary_env wHSWorkMHUSummary_buffer;
SrsReportRunController controller;
SRSPrintDestinationSettings settings;
str filePath = @'C:\MHUSummary';
str fileNameWithoutExt;
#File

conLength = conLen(_licensePlates);

for(cnt = 1; cnt <= conLength; cnt++)
{
delete_from wHSWorkMHUSummary_buffer;
controller = new SrsReportRunController();

licensePlateID = conPeek(_licensePlates, cnt);
// call the report for this context license plate
// step 1 - create records in WHSWorkMHUSummary_env table
if(licensePlateID)
{
this.insertReportTable(licensePlateID);
/*
wHSWorkMHUSummary_buffer.LicensePlateId = licensePlateID;
wHSWorkMHUSummary_buffer.Description = "Test" + int2str(cnt);
wHSWorkMHUSummary_buffer.insert();
*/

controller.parmReportName(ssrsReportStr(WHSMHUSummaryReport_env, Report));
controller.parmShowDialog(false);
controller.parmLoadFromSysLastValue(false);

settings = controller.parmReportContract().parmPrintSettings();
settings.printMediumType(SRSPrintMediumType::File);
settings.fileFormat(SRSReportFileFormat::PDF);
//fileNameWithoutExt = int2str(cnt);
fileNameWithoutExt = licensePlateID;
settings.fileName(filePath + #FilePathDelimiter + fileNameWithoutExt + 'pdf');

controller.startOperation();
}
controller = null;
}
}

How to add/create line in a form?

$
0
0

how to add or create a line in a form using x++ or functionality?

Price list

$
0
0

Hi All, 

Where can I find the price list for Microsoft Dynamics 365 for Operations?

Listing JSON and SOAP services in D365

$
0
0

Is there a URL that will list the JSON and/or SOAP services for D365 for operations like there is for listing the entities?

Thanks,
Joe


Trying to Connect D365 Operations through a third-party application: Scribe

$
0
0

Hi all,

 I am trying to connect D365 Operation Production environment through Scribe. For a third party application to access Microsoft Dynamics AX , the application needs to register in Azure as a Native application or Web Client application and this produces an unique ID called Client Id or Application Id. We need to use this Client Id in any third party application connector.

We are successfully able to connect to D365 Operations Development environment as it is hosted at our organization Azure portal and we are able to access the required information( Client Id and Authentication URI)

We tried to connect to D365 Operations Production trial environment, but it is throwing an error as below:

How can I connect to D365 Operations to any third party application??

Thanks in advance.

SysClientPolymorphicCreateSelector form issue

$
0
0

Dear All,

I have extended a new table from the table DirPerson to avoid doing customizations in DirPerson table. When I open terminate form, a form opens like the below displaying my new extended table name in the lookup.

I personalized the form and got to know that it was SysClientPolymorphicCreateSelector form. I checked for the cross reference in the form and was able to see my new extended table in Derived data source node under the datasource for DirPerson table. I don't want this form to appear. Please help me to sort out this issue!!

Thanks in advance!!

DataSource added in form is appended on each run in x++ query

$
0
0

Hi,

I have added datasource table to a form's datasource in modifed of a control.

Now for the first run it is picking form query and adding datasource table1 and then executing the query. But in the second run it is appending the table1 again. I am unable to clear the appended datasource.

Its happening like

1st run : select * from formds1 join table1 where table1.id == '1'

2nd run: select * from formds join table1   join table where table.id= ='1'

How can i clear the datasource that was added from second run.

Tried adding formds.clearranges, formds.clearlinks. NOne of them worked

Various problems with this site

$
0
0

I often run into problems with this site and I would like to know if it's the same for others.

This morning (approx. 7-8:30 UTC) I wasn't able to open any thread while logged in, because it returned this:

Sorry, there was a problem with your last request!

Either the site is offline or an unhandled error occurred. We apologize and have logged the error. Please try your request again or if you know who your site administrator is let them know too.

I was able to open everything while not being logged in, so I was able to read questions but not to answer them.
This is not the first time I saw this.

I'm aware of quite a few other issues:

  • Posting a reply or opening Actions (e.g. to edit a post) sometimes take a long time to trigger, or don't trigger at all. For example, I click Actions and have to wait a minute (!) before the menu opens. Often the Post button greys out, but nothing else happens.
    Almost on daily basis, I end up with an answer ready to post, but unable to do it. :-(
  • Replies sometimes fail to post with no obvious reasons, just saying something like "Unknown error". Trying it a few times sometimes helps. Restarting the browser usually helps. Is anybody monitoring these errors and fixing the underlying problems?
  • Clicking a thread title with Shift (to open the thread in a new tab) or right-click it shouldn't do anything with the current tab, but sometimes the application decides that it will be opening links in the current tab as well. If I use Shift, I end up with the same thread in both tabs - not what I need. Imagine I go through a list of threads and want to open five of them in separate tabs, but the list of threads is always replaced with the target page.
    I've seen it in IE and Chrome, don't remember seeing it FF (but I've stopped using FF for the community forum because of other problems). Even when the community site starts behaving weird, all other web pages works fine, so it it's the browser to blame.
  • I'm sometimes logged off with no obvious reasons. E.g. I reply to three questions and when I want to send the fourth one, it fails on authorization, because I'm not logged in.
  • That e-mail notifications often (yesterday, for instance) don't work was already confirmed by others.

I can think about a few other things, but this is enough for now.

Do you experience these problems too, or am I the only one?

Dynamics365 Development Training for Beginners

$
0
0

HI All,

I am new to Dynamics 365. Infact I have never worked on Dynamics product line. I am c# developer for web api development and desktop applications ranging from winforms to WPF.

I now feel to learn dynamics 365 as desktop applications doesn't seems to have much future. 

I already created on account and started navigation and basics of 365. 

Can anyone suggest me where  i can find the  hands on labs or development tutorials?

What other technologies do I need to learn apart from C Sharp?

How to "Go to" a link using Action Menu Item

$
0
0

Hi folks,

I am working on a Dynamics 365 for operations VM.

I want to open a hyperlink e.g. https://www.google.com.pk by clicking on an Action Menu Item.

I have added an Action Menu Item and filled properties as shown in attached picture:

But when i click on my Action Menu Item from AX it gives following error:

Is there anything i am missing?

Retrieve AIF message id during service call

$
0
0

Hi guys,

I have a question regarding the use of custom services in Ax 2012. We are working at a client who has a .NET front office system and our Ax 2012 back office system. We have a lot of custom services to create/read/update/delete data from Ax.

The problem:

Because we have so many services and so many calls happening, it's very difficult to locate the origin of a problem. When, for example, an update went wrong, it's very difficult to retrieve the exact call that handled the update. We need this call to verify if the problem comes from the front office (providing us wrong data) or in Ax (handling the data wrong).

Question:

Is there any way to retrieve the AIF Message id during the call, so that we can store this data somewhere as a sort of logging system?


A few questions about SysGlobalObjectCache

$
0
0

Hi everyone

I've just got a few questions relating to SysGlobalObjectCache; I know there is good help around, but I'm struggling to find a few answers... (The best source I think is https://blogs.msdn.microsoft.com/axperf/2011/12/29/using-sysglobalobjectcache-sgoc-and-understanding-its-performance-implications/)

Here are some questions:

1) To 'Connect' to or instantiated a SysGlobalObjectCache object, you use

SysGlobalObjectCache sgoc = new SysGlobalObjectCache();

Since a singleton pattern is used, this will always return the current instance of the object. Why then do I see cache being retrieved like this (what's the gain?):

    if(classfactory) 
    { 
            c = classfactory.globalObjectCache(); 
    } 
    else 
    { 
           c = new SysGlobalObjectCache(); 
    } 

2) According the article above, "the SGOC will propagate “clear” calls to all clients and other AOS instances"; I presume Cache is cleared automatically as it gets full. Does the 'clear' method that gets propagated flush per scope, or per key or per value etc? How much cache gets flushed when clear is called?

Thank you

Use of Dynamic Query using classes

$
0
0

Hi,

Can anybody tell me what is the exact use of writing Dynamic Query using classes in AX 2012.

Also if you can tell some difference between AOT Query and writing Dynamic Query using classes.

Thanks,

Tauseef.

AIF calls - on what server are they executed?

$
0
0

Hi Guys,

I have the following question about the execution of AIF service calls:

We have a company where we work together with a front office tool. The front office tool reads/writes/updates data in Ax through AIF Custom Services we created.

At this customer, we have 5 production servers. 2 user servers and 3 batch servers. The setup and deployment of the AIF Inbound Ports has been done on server PRD-01.

Now i was wondering if these service calls are always performed on server PRD-01?

The reason i ask:

Let's say we see an error in one of the service operations. PRD-01 is a user server, so we can easily fix the code on that server and generate an incremental CIL. The calls running on PRD-01 will be using this new code. The other servers will not be updated automatically and so they will have the old code.

How to make a Form and it's Data Source User Independent

$
0
0

Hi All,

I have created a form in an user can filter records using dates and Print report.

I am making use of  a TempTable  as Form's Datasource.

So whenever an user open up this form the data will be deleted so that it's grid looks empty.

Now the problem is weird scenarios raising when multiple users accessing the form simultaneously.

For Ex :

simultaneously USER 1 and USER 2 accessing the form , now either of those two user has to wait or it wont works for both the users . I mean just going to not responding state.

Please suggest me a solution to proceed further.

Regards,

Nishath Salman N.

I need to decrypt a value in SQL that was encrypted in Ax using CryptoApi

$
0
0

Hi everyone

I'm dealing with data in SQL that was encrypted in Ax 2012 using CryptoAPI. Now I'd like to know how to decrypt it inside of SQL, without the aid of Ax. my guess is that the way that I do this is by calling a Windows dll that uses the same algorithm that Ax uses.

My questions are:

- Is what I'm trying to do possible?

- What would the dll be that I would use and where would I find it within the operating system?

- What does the code look like in SQL? (having checked a website or 2, I've come to this. I need the ??? filled in. 'scuse the rough SQL)

CREATE ASSEMBLY ???
AUTHORIZATION dbo
FROM ???
WITH PERMISSION_SET = UNSAFE
GO

CREATE PROCEDURE decryptValue
@key BIGINT,
@pass BIGINT,
@ret NUMERIC AS EXTERNAL NAME ???.decrypt
GO

DECLARE @key BIGINT,
DECLARE @pass BIGINT EXEC DECRYPTvALUE 1111, 1111 PRINT Ret

Thanks
Viewing all 17532 articles
Browse latest View live


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