Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Conditions on Text Field

(0) ShareShare
ReportReport
Posted on by 130

Hello BC Community

I want to create a multiline description field for purchase lines that:

  • equals purchaselines.multilinedescription if purchaseHeader.QuoteNo. <> '' (NULL/BLANK) - this means that it came from a purchase quote process
  • OR equals item.description if document type = '' (BLANK)

The use case is the base description field in Purchase Lines gets overwritten during our purchase quote process (user overwrites as we use generic part names (E.g. TOOL) to order one off items). Our management finds this field too small and difficult to read, so want to make a text field that is multiline = true. 

Therefore if it is a purchase quote - the multilinedescription field should be '' (so user can fill it in), but if a purchase order is generated, the purchaseline.multilinedescription should = item.description

Thank you

**MODIFIED MY BULLETS - ORIGINAL REQUEST WAS REVERSED"

  • Jarrod Case Profile Picture
    Jarrod Case on at
    RE: Conditions on Text Field

    Hey SammySevens, excellent. Jeffrey Bulanadi - I'll let you answer this one if your about.  Jeff is one our senior developers.

  • SammySevens Profile Picture
    SammySevens 130 on at
    RE: Conditions on Text Field

    Hi JC,

    I'm relatively proficient in AL programming (controls engineer turned BC developer) - creating the field in the table extension, and visualizing it on the page (along with Multi-Line enabled) are working ok.

    The issue I'm dealing with is specifically around the AL customizations required to perform the logic I've indicated in my bullet points. Do you have any examples of that, or some insight on how I could customize that?

    Thank you

  • Suggested answer
    Manan_Shah Profile Picture
    Manan_Shah 1,457 on at
    RE: Conditions on Text Field

    Hi,

    I suggest you can use Purchase Line Comments option to add details of Item in Multiple lines. As I am not too sure but in Purchase Line it's not easy to  add field for Multi line also it's not easy to for viewing. 

    You can add comment Purchase line wise. 

    pastedimage1672635447651v1.png


    Hope this will help.

    Many Thanks,
    Manan

  • Suggested answer
    Jarrod Case Profile Picture
    Jarrod Case on at
    RE: Conditions on Text Field
    [quote user="SammySevens"]

    Hello BC Community

    I want to create a multiline description field for purchase lines that:

    • equals purchaselines.description if purchaseHeader.QuoteNo. <> '' (NULL/BLANK) - this means that it came from a purchase quote process
    • OR equals '' (BLANK) if document type = 'Quote'

    The use case is the base description field in Purchase Lines gets overwritten during our purchase quote process (user overwrites as we use generic part names (E.g. TOOL) to order one off items). Our management finds this field too small and difficult to read, so want to make a text field that is multiline = true. 

    Therefore if it is a purchase quote - the multilinedescription field should be '' (so user can fill it in), but if a purchase order is generated, the purchaseline.multilinedescription should = item.description

    Thank you

    [/quote]

    Hi SammySevens ,

    We do this via an extension - see below:
    pastedimage1672631923534v1.png

    Per the above it expands the new description to 2048 characters.

    if you have a partner they can build one for you being a 'Per Tenant Extension' or PTE. We provide a multi-line description on item cards (for it groups for example with complex descriptions) and we also update the merge templates for invoices to include this on the quote, Sales Order or Posted Sales Invoice. Other documents like picks/shipments keep the single line description. 

    You cannot do this easily without the customisation. 

    I hope this helps. 

    Thanks in advance,

    JC

    Please confirm I've answered your question by clicking 'yes'

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans