Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

When Opening from a specific button

Posted on by Microsoft Employee

I've added a button which opens the sales comments line page. When this page is opened from this exact button I need to set a tick box to true when a new comment line is added. My current method was like this. However It doesn't appear to trigger correctly. Where should I relocate the code? 

OnAction Button

frmSalesComment.CreateCommentFromPick; // Sets a global Variable 

On the Sales Comment Page 
CreateCommentFromPick()
gblnCommentFromPick := TRUE;

OnAction Button 
cuSalesMgmnt.ShowSalesCommentsFromPick(Rec); // Opens the comment Page 

On the Sales Comment Page 

OnNewRecord(BelowxRec : Boolean)
IF gblnCommentFromPick = TRUE THEN
"Sales Shipment" := TRUE;

*This post is locked for comments

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    Yogesh Kulkarni_ 1,762 on at
    RE: When Opening from a specific button

    To which table that "Sales Shipment" field belongs? And from where you are calling this code?

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: When Opening from a specific button

    In which table it should be tick as true ? Is it in comment table or any other table ?

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: When Opening from a specific button

    where is that new field that needs to be true? is it in calling page or in Sales Comment page?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans