Quick update, NetDocs, unlike every other document tracking systems I have used, Doesn't store it's data in Salesforce / Litify. Rather it only logs login information in Salesforce for each user. Thus, no automation can live in Salesforce that would effect docs.
If I were advising DL as a Salesforce developer, I would let them know that they would be unable to report on document data or automate it in anyway unless they use another solution like DocuSign or even the standard salesforce solution.
In either of these situations the following code would resolve the issue:
public class ContentDocumentLinkHandler {
public static void preventDuplicateFileNames(List<ContentDocumentLink> newLinks) {
Set<Id> parentRecordIds = new Set<Id>();
Set<Id> newDocIds = new Set<Id>();
for (ContentDocumentLink link : newLinks) {
if (link.LinkedEntityId != null && link.ContentDocumentId != null) {
parentRecordIds.add(link.LinkedEntityId);
newDocIds.add(link.ContentDocumentId);
}
}
// Get titles of the incoming documents
Map<Id, String> newDocTitles = new Map<Id, String>();
for (ContentDocument doc : [SELECT Id, Title FROM ContentDocument WHERE Id IN :newDocIds]) {
newDocTitles.put(doc.Id, doc.Title);
}
// Query existing file titles already attached to those parent records
Map<Id, Set<String>> recordToTitles = new Map<Id, Set<String>>();
for (ContentDocumentLink link : [
SELECT LinkedEntityId, ContentDocument.Title
FROM ContentDocumentLink
WHERE LinkedEntityId IN :parentRecordIds
]) {
if (!recordToTitles.containsKey(link.LinkedEntityId)) {
recordToTitles.put(link.LinkedEntityId, new Set<String>());
}
recordToTitles.get(link.LinkedEntityId).add(link.ContentDocument.Title);
}
// Prevent duplicates
for (ContentDocumentLink newLink : newLinks) {
String newTitle = newDocTitles.get(newLink.ContentDocumentId);
Set<String> existingTitles = recordToTitles.get(newLink.LinkedEntityId);
if (existingTitles != null && existingTitles.contains(newTitle)) {
newLink.addError('A file with this exact name has already been attached to this record.');
}
}
}
}
so would this work for him given his system and the document delivery
It would not, most SFDC doc programs have a record to check, this one is a glorified embedded web browser
So no record, no automation, I didn't expect the solution to be so....old
got it. I will follow up with Nick C saying you did some research and what you were thinking of suggesting would not work given NetDocs
Would have been a good bit of info for Nick C to provide, but I don't think he knows
or he knew and thats why he put his hands on his head
either way thank you for doing the research and looking into it
Of course, wanted to throw the code at you so you didn't think i was just talking
Of course, wanted to throw the code at you so you didn't think i was just talking
did you get to the note update from the meeting?
I did, updated the confluence doc
I don't think I have see or have access to that yet. Can you show me what you sent?
Yeah, I think you are correct, let me get you a PDF
who would be able to add me to that?
Once apon a time I could have, they took those permissions away, so need to ask Sikich, they manage it now
got it...I can ask Nick
did he get us the missing questionnaires?
Not to my knowledge, but Dustin might be better informed
Mind if I ask where they parked you?
Lol, yes I was wondering, wanted to touch base when you have moment, saw you but you looked busy at the time
ah I think I am in the crump section near the exit door
Got it, fairly sure I know where that is
somewhat near the front of the building but on the backside
we can meet in a room if you want to chat
so it's in the open and everyone can hear
Yes, I did step out for the day, but I could swing around or we could connect tomorrow
but there is that old office of the crump attorney is no longer in
ok yeah i will be here all day tomorrow for sure
Fair enough, I get in around 7:30 most days, would love to chat more about SFDC and Jira if you are interested
Let's see when we have some time, but earlier is better for me
for sure I am...maybe 10:30 ish
No worries, I can always stay later if that works better for you
we can just connect tomorrow and find a mutual time.
let me know if you still want to connect today
Absolutely, I have time now if you do
Absolutely, I have time now if you do
Good morning! Quick question...I saw Kasia asked if we are sending any MI Clergy cases her way today. Do we have any and if so how many?
The campaign is open, they don't have signed leads yet, but it is pending
I just saw he declined the meeting this afternoon
He is in today, has a meeting with another client
got it...so will you lead the updates on the call today or McFadden?
McFadden, we all discussed where we are at, so we should be fine in any case
is the catchup meeting going?
I saw your email saying you will send JP a ticket to change that report to CSV...I would wait for Nick C to chat with him about it
I don't know what email you are referring to. the meeting notes? That was just the notes from the meeting on friday
https://dicellolevitt.atlassian.net/wiki/spaces/shl/pages/68190209/Progress+Check+In+-+Meeting+notes
I don't know what email you are referring to. the meeting notes? That was just the notes from the meeting on friday
https://dicellolevitt.atlassian.net/wiki/spaces/shl/pages/68190209/Progress+Check+In+-+Meeting+notes
Hey, let me know when you have a few min today to chat
Hey, back from lunch, seems like I just missed you, let me know when you have a moment!
How is the AWKO integration going?
AWKO tests are done, just waiting on internal QA, should be ready Monday assuming no complications
Can you do a little push on the AWKO integration when you get a min. We want to get that complete as soon as possible
Can you do a little push on the AWKO integration when you get a min. We want to get that complete as soon as possible
I have no idea what a 'little push' means and have been instructed to take notes for all the DL meetings
yeah for sure notes on DL. I was just following up on the message from Friday for AWKO saying it was waiting on internal QA. I just want to make sure that gets completed as soon as possible because we have been signing cases that need to get into their system.
Sure, the blocker there has been Dustin's time TBH, we had th test calls to QA run on Friday, but it's kinda waiting for him to leave a meeting for each next step ..... like this one 😛
We really should have more internal documentation on these processes
I agree. It's a new process and I am glad it's being followed. Documenting it will be good for future as I am sure there will be new bodies in the office
I can't type in the teams chat....can you please that I need to run to a meeting
Quick update going through the final QA check for AWKO, in an hour or two at most before payloads are going out
Quick update going through the final QA check for AWKO, in an hour or two at most before payloads are going out
Were you able to work on the AWKO integration?
Yes, we got feedback and are making the requested changes
the feedback from yesterday correct?
Yes, jumped on it as soon as we had the DL tests in
Just finishing up now, getting ready to test
ok great. it would be great to get that last bit sent to them today so we can hopefully get that off the list
Absolutely, addressed all the issues, just waiting on the final code review and approval
Thank you for keeping on top of the AWKO and offering a call
Oh no worries, did end up connecting with James, seems like a nice guy, told him to save my number and let me know if anything goes wrong
Was turning into one on one emails
can you please get with AWKO today and finish the integartion.
They reached out and we are testing again, it's more them adjusting at this point 👍
They reached out and we are testing again, it's more them adjusting at this point 👍
ok sounds good. would be great to get this put to bed by the end of the day. I know we have simpllyconvert that needs to get going today for sure as well. the one discussed in the meeting today. See if Dustin needs help with that one...hopefully it's more straight forward.
Are you all coordinating on projects that are coming in and having the right people delgated? Not sure if you started to use Monday for that for a little project management or what you decided
I have been using Monday, the 'right people' might be up for debate lol
I suppose 'we are using Monday' is more accurate