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

Retrieving the current record in a lookup event handler in a form extension

$
0
0


Hi

Is it possible to get the current record in a lookup event handler in a form extension?

I have the following code that demonstrates what I need to do. I have created a new table called CustomRecord that has ContactPersonId, ItemId and Configuration as fields. I have extended the smmContactPerson form and added a new grid for the CustomRecord table. I want the dropdown for the Configuration field to be based on the ItemId field, but I cant work out how to get the data from the currently selected CustomRecord record.

[ExtensionOf(FormStr(smmContactPerson))]
final public class smmContactPersonEventHandler_Extension
{

    [FormControlEventHandler(formControlStr(smmContactPerson, CustomRecord_Configuration), FormControlEventType::Lookup)]
    public void CustomRecord_Configuration_OnLookup(FormControl sender, FormControlEventArgs e)
    {
        CustomRecord customRecord;
        FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;

	// TODO: find out how I retreive the current CustomRecord record

        CustomRecord::lookupConfiguration(sender, customRecord.ItemId);

        ce.CancelSuperCall();
    }
}

Can someone point me in the right direction please?

Thanks,
Joe


How to improve performance of SSRS report

$
0
0

what are steps we have to follow in improving  performance of SSRS report

Error when sending data to TcpClient

$
0
0

using tcpclient in ax .using interoppermission clrinterop in ax but not able to send the message to port. no errors. [Moved from title by moderator]

when i am using 

new InteropPermission(InteropKind::ClrInterop);
permission.assert();

 i am not able to send tcp port data to port. and when i am not using that i am getting error.

 i am sending a string.

Could not communicate with Microsoft Outlook client

$
0
0

Hi,


The question's answer is a mystery. I read many articles and solutions about this problem, but nothing worked for me. I have this issue regarding outlook/exchange integration with AX user.

Some answers to this question which did not work for me:

http://blogs.msdn.com/b/emeadaxsupport/archive/2009/05/08/could-not-communicate-with-microsoft-office-outlook-client.aspx

https://community.dynamics.com/ax/f/33/t/76718


I have tried installing Outlook 2010 and Outlook 2013. Both are 32-bit. It did not work. Should I try Outlook 2016 if that work? We don't even know that it is compatible with AX 2012 R3.

I have both of the versions on different systems: Ax 201 R3 or Ax2012 R3 CU8, it does not work on both of them.

It is very weird that both are Microsoft products but having so many issues communicating with each other, why????


With CU8, exchange parameters were added to Ax 2012R3. But surprisingly AX does not communicate with Exchange as well.  We have on-premises Exchange Server so it should be very easy for AX to communicate with mailboxes, but "NO"!!!!


In  the end i have to post here like others did, I would really appreciate if anyone provide me/others any additional fix for Outlook or exchange integration with AX.

Query object should call method insert_recordset remotely

$
0
0

Query object should call method insert_recordset remotely

Sales Order Number Sequence

$
0
0

When creating an order, AX claimed the order already existed. AX then deleted another users already existing order - Later to which we found out the order number was the same, this is happening a lot. I checked the number sequence Sale_40 for Sales Orders. It set to:

Continuous (ticked)

Smallest - 1 Largest - 999999 Next - 299043

Clean up (ticked)

Interval - 24.00 Date/time

14/12/2016 (the time was 1 hour ago)

I can't see there being a problem with the number sequence, as it is for a lot of people too, resetting usage data wouldn't be the issue. Has anyone come across this before?

Authentication issue with OData service

$
0
0

How can I consume ODATA service in VHD provide by Microsoft. I have setup VHD at my place, have created basic forms and other basic stuffs, but as in-bound ports are no longer there, how can I access the ODATA service from AOS running inside the VHD?

need to return the value from while based on a condition

$
0
0

display ItemName BatchName()
{
InventBatch inventBatch, inventBatchLoc;
InventTable inventTable;
InventDim inventDim;
EcoresProductAdditionalAttributes ecoresProductAdditionalAttributes;
ItemName itemName;
InventBatchId batchId;

inventTable = InventTable::find(this.ItemId);

ecoresProductAdditionalAttributes = EcoresProductAdditionalAttributes::findFromProduct(inventTable.Product);
if(ecoresProductAdditionalAttributes.MiscItem == NoYes::Yes)
{
while select inventBatchid from inventBatch where inventBatch.itemId == this.ItemId

{
batchId = inventBatch.inventBatchId;
select BatchItemName from inventBatchLoc where inventBatchLoc.inventBatchId == batchId;
itemName = inventBatchLoc.BatchItemName;
<I want to return itemName from here but it is not feasible. how do i  loop  through all the batch id and return their corresponding batchItemname >
}


}
else if(ecoresProductAdditionalAttributes.MiscItem == NoYes::No)
{
itemName = inventTable.NameAlias;

}


return itemName;
}


Difference in net amount and unit price

$
0
0

Dear All,

We have a very rare issue found in our system where a user has entered a sales order with a quantity and have entered the unit price and posted the invoice.

Now if we check the invoice the net amount which should be equal to the quantity multiplied by unit price is not matching.

Example:

Standard Scenario: Sales Order:
Line 1
Item A Quantity 100 Unit Price 10 Net Amount 10000

Issue:

Sales Order
Line 1
Item A Quantity 100 Unit Price Net Amount 10010

How is this possible
Please help

Automatic Purchase Order After Purchase Requisition

$
0
0

Hi All,
my client wants to use PO & PR Workflow in same time.
i had created both workflow.
and he need automatically creation of PO from once PR Approved.
So i setup automatic creation of po once PR Approved through purchase policy and batch job, it is working fine but problem is once PR Approved PO Is creating with Approved Status.
if we wants run PO workflow it should be with DRAFT Status.
So Please Help Me to solve this issue.
For Manual Creation of Purchase Order after completion of Purchase Requisition it is working fine -- small customization
Classes\PurchAutoCreate_PurchReq\endUpdate
public void endUpdate()
{
super();
// Calculate discount before purchTable is automatically changed to approval status
if (purchTable.ChangeRequestRequired)
{
purchTable.reread();
if(PurchParameters::find().AutomaticTotalDiscount)
{
purchTable.updateFinalDisc();
}
}
//purchTable.autoApproveChangeRequest(); commented this line
}

For Automatic
In purchase Requisition in setup policies they have given option as
Automatically Create Purchase Order
then in Periodic - Batch Purchase Order Generation from there Batch Job setup is done
and After approved status of Purchase Requisition only the batch job runs and purchase order is created and after succesful creation of purchase requisition The status of purchase requisition is changed to Closed Status..which means Purchase Order is created as per my knowledge
After successful creation of purchase order the status of purchase order is coming as Approval.we want to customize as Draft
Please Provide any help

Thanks,
Regards,

AIF - Date effective framework in Document Services

$
0
0

Hi

I am having an issue with the date effective framework when querying the HCM module by calling the standard document service HCMWorkerImportService.

The query AxdWorkerImport contains the HcmEmployment table but as you know this is controlled by the ValidFrom and ValidTo dates automatically.

The process at my customer is to hire employee with future employment which seems to be the normal thing to do. How ever calling the Read operation on these new employee will not return any data for HcmEmployment and its sub-data sources.

Normal workaround on queries are to add something like: query.validTimeStateAsOfDate(date) but is that possible in AIF?

If any has had this problem or perhaps see a way out of this, please respond. But I do not need to be told to make my own Custom service. I know this is a solution and gives me plenty of control and I wish the solution was based on a custom service. But at the moment this is not an option.

Thanks

Thomas

How can I make entity properties available for fetchxml query?

$
0
0

I have an entity (let’s call this entity A) that has a field (a look up of categories for the ‘Category’ entity (let’s call this entity B).

Within a liquid template I am using fetchxml to get a list of entity As but not all properties for the returned entities are available. Also when I look at the API endpoint for this entity I can see that the property that i would like to make available starts with an underscore, i.e. _category

Is there some setting that I need to change for the entity?

Auto group Project elements

$
0
0

In D3FO, Visual Studio automatically groups project elements by their type. This however is not a feature in 2012/2009. Has anyone written a job which does this? If not, would anyone be interested in collaborating on this Project? I think it could be a useful contribution to the AX developer community. 

Dynamics AX7 Webservice authentification

$
0
0

Hey,

I created a simple webservice in ax that returns a string. The WSDL is available. Now Iam trying to consume this webservice via a C# program.

I used this guide: https://ax.help.dynamics.com/en/wiki/dynamics-ax-7-services-technical-concepts-guide/ and the following code samples: https://github.com/Microsoft/Dynamics-AX-Integration/tree/master/ServiceSamples/SoapConsoleApplication

The Problem is that we are using the contoso image for developing. Is there any way for a simple authentification without the Azure Active Directory?

We don't have this option right now but we need to test the services.

Best regards

Alex

Error on Code Upgrade AX7 CTP8 to AX RTM

$
0
0

When we are doing Code Upgrade From AX7 CTP8 to AX RTM version by using LCS we are getting  following error on Analyze Code Function :

"Customer Model contains no metadata to upgrade. Please make sure the Descriptor folder has valid contents."

If/else inside switch case statement

$
0
0

Is it common to add if else inside of a switch case? Trying to see if there is a better way!

switch(something)

case(something)

if

else

break;

Failed to start AOS

$
0
0

Dear Experts,

I`m having trouble to restart AOS due to some issues from last night, where we were not able to post any journals. (see error message below).

Any suggestions are welcome

V

Import label file

$
0
0

Dear Experts,


We imported a new lable file after renamed it from AxSYSen-us.ald to AxSYSxx-xx.ald. The import has been successfully completed but we are unable to locate any new language to Administration--> setup -->system parameters. 


Please Advice

add records in related table

$
0
0

I mean, if I have table One(field: description,RecId) and table Two(OneDescription, RecId), field OneDescription relates to One's description and I also have form where I have referencegroup of OneDescription, where I can choose descriptions of recors from table One, if I type something different it throws an error so how can I add new record in table One from this form?

SysDataBaseLog Issue - Wrong Parameter Passed

$
0
0

Hi all,

Please let me know what causes the below error.

When I open InventTable and go to (Database Log),  on History tab I get the below error . 

Viewing all 17532 articles
Browse latest View live


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