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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Some Item Descriptions are coming and some are not coming.

(0) ShareShare
ReportReport
Posted on by 50

Hi All,

       I am doing a processing only report where it has to show a message, where  if the purchase description is " ", for a item then it has to take from the sales description of my item pageextension but if the purchase description is null also only some items are showing its sales description but some are not showing the sales description, why it is coming like that can anyone help me my code is

Trigger OnafterGetRecord()

begin

clear(Description_Custom);

 if Item.Get("Purchase Line"."No.") then

 if item."Purchase Decription" = '' then

 Description_Custom := Item."Sales Decription"

 else

 Description_Custom := Item."Purchase Decription";

Message('%1,%2',Item.No., Item.Description_Custom);

end;

Below I am attaching the message, if anybody know why it is coming like this help me.

pastedimage1678704250991v1.png

pastedimage1678704330264v2.png

Thanks & Regards

Satish.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Some Item Descriptions are coming and some are not coming.

    You code seems right to me, where is the problem I did not get you properly.

    Thanks

  • Sarath9999 Profile Picture
    50 on at
    RE: Some Item Descriptions are coming and some are not coming.

    Hi Nitin,

                I am doing a processing only report, I want to show a message of the item No., item Description, in the item table I have given two custom fields, where purchase description and sales description, if the purchase description is blank, it has to take the value from sales description, but for some items it is taking the sales description values for some items and for some items it is showing null, I didn't insert any values in the purchase description.

    Thanks & Regards

    Satish

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Some Item Descriptions are coming and some are not coming.

    Can you try this?

               Trigger OnafterGetRecord()

               begin

                   clear(Description_Custom);

                   if "Purchase Line".type = "Purchase Line".type::Item then begin

                       if Item.Get("Purchase Line"."No.") then

                           if item."Purchase Decription" <> '' then

                               Description_Custom := Item."Purchase Decription";

                           if item."Sales Decription" <> '' then

                               Description_Custom := item."Sales Decription";

                       Message('%1,%2', Item.No., Description_Custom);

                   end;

               end;

  • Sarath9999 Profile Picture
    50 on at
    RE: Some Item Descriptions are coming and some are not coming.

    Hi Nithin,

             I have tried in the way what you said but again also it is not coming, can you have any other suggestions, Thank you very much for your help.

    Thanks & Regards

    Satish.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Some Item Descriptions are coming and some are not coming.

    Seems that you are not able to describe your requirement, can you please put some screen shot or brief it more

    Thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans