Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP2013, eConnect, and a locked form

(0) ShareShare
ReportReport
Posted on by 110

Hey there,

I'm creating a new payment entry screen (using VST) that will open off of the current GP sales order entry screen.  When on this new screen, payment details will be entered by the user and a payment record will then be created for the order using eConnect.  The problem is, when I try to update the order entity using eConnect, I get an error saying that the form is locked by another user.  Of course, that "other user" is me since the order entry form is open behind the payment entry screen.

Is there a way to override this form lock?  My dirty solution is to close the form, run the eConnect transaction, and then re-open the form.  Is that the only way to solve this issue?

Thanks!

-Nathan

*This post is locked for comments

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: GP2013, eConnect, and a locked form

    Close the form, run the eConnect Transaction and re-open the form. This is the only solution to accomplish to your requirement. Other wise if you try to clear the locked record from the opened window, this is against the standard GP logic. I would not recommend you to break the GP logic.

    Hope this helps!!!

  • NathanE Profile Picture
    NathanE 110 on at
    RE: GP2013, eConnect, and a locked form

    Thanks for the response!  In order to add the payment record to the order you have pulled up, I have to update the order using the SOPTransactionType object in eConnect.  So yes, VST is updating the order at that time.  Here's the relevant code:

    var header = new taSopHdrIvcInsert
    {
      SOPNUMBE = sopNumber,
      SOPTYPE = (short) sopType,
      BACHNUMB = order.BatchNumber,
      CUSTNMBR = customerNumber,
      DOCDATE = order.OrderDate.ToShortDateString(),
      DOCID = order.DocumentID,
      PYMTRCVD = payment.Amount,
      UpdateExisting = 1
    };
    
    taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord paymentLine =
      CreateCreditCardPaymentLine(sopNumber, sopType, order, customerNumber, payment);
    
    var transactionType = new SOPTransactionType
    {
      taSopHdrIvcInsert = header,
      taCreateSopPaymentInsertRecord_Items = new[] {paymentLine}
    };
    
    var eConnect = new eConnectType {SOPTransactionType = new[] {transactionType}};
    
    return base.UpdateTransactionEntity(eConnect);
    

    And here's the error text:

    Thanks again!

  • steveendow Profile Picture
    steveendow 2,281 on at
    RE: GP2013, eConnect, and a locked form

    Hi Nathan,

    Something about your description doesn't sound quite right.  To the best of my knowledge, eConnect isn't aware of forms or form locks.

    Are you sure you don't have some VST code that is trying to reference, read, or update the order form?

    Can you paste the relevant lines of your code that trigger the error, and/or the full text of any error message you are receiving?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans