web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Retail POS : Initialize new retail transaction by code (Retail AX 2012)

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I'm currently building a customization form that can search a loyalty member (by name, and phone) and apply loyalty member by using blank operation. When i clicked the blank operation button, they opened a custom form that can search a loyalty member. Once my clicked the "apply" button, they go back to the main blank operation class to add loyalty member to the transaction. 

However, the problem is.. I can't add loyalty member to the transaction before i added an item(s) to the transaction. That's because if you want to use "AddLoyaltyRequest" method, you need retailTransaction parameter and loyalty id. the loyalty id is no problem because i can get it from the form.  The posTransaction / retailTransaction parameter is still empty because there is no transaction. So, in order to apply loyalty member into the transaction, i have to add / scan an item first, and then go to the search form and apply loyalty with no problem.

Is it possible to initialize pos transaction / retail transaction without adding item(s) first? 

Because, when i saw the standard "Add loyalty card" button, the loyalty member can be applied without adding item(s) first to the transaction.

Here is my code snippet.

public void BlankOperation(IBlankOperationInfo operationInfo, IPosTransaction posTransaction)
{
retailTransaction = posTransaction as RetailTransaction; if (operationInfo.OperationId == "1") { SqlConnection connection = Application.Settings.Database.Connection; frmSearchMember searchForm = new frmSearchMember(connection); searchForm.BringToFront(); searchForm.ShowDialog(); searchForm.Focus(); if (searchForm.returnMember == true) { Application.Services.Loyalty.AddLoyaltyRequest(retailTransaction,searchForm.loyaltyID); } operationInfo.OperationHandled = true; } }

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Shima.Y Profile Picture
    50 on at

    hi Yonathan W 

    could you find a solution for this ? I have same problem .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans