Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Log table Issue

(0) ShareShare
ReportReport
Posted on by 390

Hey team,

I created a log table on my form "Associate Form" which store the records of the associate which are created through a batch job. If the associate is created successfully the Log table stores the details as "Associate Created successfully" and if there is any error it stores the system generated exception in the log table. Now this data is stored in log table through the same batch job which creates the associates. I have written the insert method of log table in the same batch job. In the action pane of my main form [Associate form] there is a action menu item which when clicked for a particular associate shows the logs for that associate. But now I have a problem, the information of associates created before writing the log insert method have no information in the Log table which I don't want. I want that when the previous entries are clicked either it shows the same way as above or a message as "No logs available" for that associate. How can I achieve this?

My log Table:

LogsData.png

The info when an associate is selected and logs are viewed for that associate:

SuccessLogImage.png

Information of previous associate [before log insert method]

PreviousEntryLog.png

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Log table Issue

    Hi skd,

    Great! Please mark the helpful answer as verified.

  • skd Profile Picture
    390 on at
    RE: Log table Issue

    Hey  Gunjan Bhattacharyya ,

    Thank you so much your suggestions helped a lot.

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Log table Issue

    That's why it is trying to insert a new record when none exist. You can set the "Insert if empty" property to "No" so that it displays no record when nothing exists in the logs.

    Based on your requirement, I think you have 3 options -

    1. Show no records when the log form is opened when none exist.

    2. Disable the "Log" button from the associates form when no logs exist for the particular record.

    2. Run a job to create log entries for all successful records for which no logs exist.

    You can decide on which suits your requirements best.

  • skd Profile Picture
    390 on at
    RE: Log table Issue

    No, I have kept it to "yes" for now.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Log table Issue

    Hi skd,

    On the form showing the log for the associates, do you have AllowCreate, AllowDelete and AllowEdit set to "No" for the data source?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,118 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans