No duplicate entries when uploading contact list in SugarCRM - sugarcrm

I have an excel file that I upload to append my contact list in SugarCRM. I would like for if a name the excel file is already present in the database, this particular entry is not appended. Is this possible?

The Sugar import interface will also allow you to do duplicate checking as a part of the import process. See this page in the application guide:
http://www.sugarcrm.com/crm/support/documentation/SugarCommunityEdition/6.2/-docs-Application_Guides-Sugar_Community_Edition_Application_Guide_6.2.0GA-Import.html#1132356

i think the easiest way for this is to:
1) export your current contact list to CSV
2) add it as a new in sheet in your current excel file
3) cross-reference which rows have are present between both (use 'vlookup' or 'match' on whatever criteria you use to determine duplicates)
4) filter the results so non-duplicates are shown, and save that as the a new CSV file
5) import the new csv-file via sugarcrm UI
hope this helps

Related

Automatically download emails from Outlook with SAS or Outlook rule

I am trying to create a program to automatically download the attached files that are sent to us from a certain email and then transform the delimiter with SAS, of those csv that are attached to us and pass those csv through a flow that I have already created.
I have managed to create a program that treats the csv as I want and the delimiter that I want, the problem is that when it comes to automating the download of files from Outlook it does not work.
What I have done is create a rule with the following VB code that I found on the internet:
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\ES010246\Desktop"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub
I have changed the path to my personal path where i want the files are downloaded.
website: https://es.extendoffice.com/documents/outlook/3747-outlook
The problem is that this code does not work for me, it does absolutely nothing for me and no matter how much I search the internet, only this code appears.
Is there any other way to do with SAS what I want? What is it to automatically download 8 csv files sent to me by Outlook, or has someone experienced the same thing as me with VBA?
I have followed all the steps about 7 times so I think the error is not in copying the code or selecting certain options wrong, in fact I had copied and pasted the code and later I modified the path where I wanted those to be saved. files but it doesn't work, does anyone know why?
I will be tremendously grateful, thank you very much for everything!
First of all, you need to make sure the file name and path doesn't include forbidden symbols.
The VBA macro used for a rule in Outlook is absolutely valid except that a mail item may contain the attached files with the same name, so a file saved to the disk may be overwritten (saved with the same name). That's why I'd suggest generating a file name with your own unique IDs making sure that DisplayName property is not empty and has a valid name what can be used for file names (exclude forbidden symbols).
Also you may consider handling the NewMailEx event of the Application class which is fired when a new message arrives in the Inbox and before client rule processing occurs. Use the Entry ID returned in the EntryIDCollection string to call the NameSpace.GetItemFromID method and process the item. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem.
The Items.ItemAdd event can be helpful when items are moved to a folder (from Inbox). This event does not run when a large number of items are added to the folder at once.

Smart sheet API - replace sheet?

I am using the Smart Sheet Python API.
How can I update data completely using the same sheet ID?
My approach was to loop through the columns and delete them (or delete the rowIDs) to clear out the existing sheet. How can I now load new data to the same sheet so I do not have to reshare it, etc?
Is there a more efficient method?
You could also use the copy_sheet function. This will create a copy of your current sheet, and then using the includes parameter you can specify whether the data is copied, or the shared users are included in the copy.
In your situation, it sounds like you want to have a blank copy of the sheet with the same shared users. That call in Python would look something like this:
copy_response = ss_client.Sheets.copy_sheet(
sheet_ID, # sheet_id
ss_client.models.ContainerDestination({
'destination_type': 'home', # folder, workspace, or home
'destination_id': None, # folder_id
'new_name': 'newSheetName'
}),
'shares' # includes
)
print(copy_response)
For a complete list of the available includes take a look at the Smartsheet API Docs section for Copy Sheet.

How to make a section optional when mapped to optional data in a Word OpenXml Part?

I'm using OpenXml SDK to generate word 2013 files. I'm running on a server (part of a server solution), so automation is not an option.
Basically I have an xml file that is output from a backend system. Here's a very simplified example:
<my:Data
xmlns:my="https://schemas.mycorp.com">
<my:Customer>
<my:Details>
<my:Name>Customer Template</my:Name>
</my:Details>
<my:Orders>
<my:Count>2</my:Count>
<my:OrderList>
<my:Order>
<my:Id>1</my:Id>
<my:Date>19/04/2017 10:16:04</my:Date>
</my:Order>
<my:Order>
<my:Id>2</my:Id>
<my:Date>20/04/2017 10:16:04</my:Date>
</my:Order>
</my:OrderList>
</my:Orders>
</my:Customer>
</my:Data>
Then I use Word's Xml Mapping pane to map this data to content control:
I simply duplicate the word file, and write new Xml data when generating new files.
This is working as expected. When I update the xml part, it reflects the data from my backend.
Thought, there's a case that does not works. If a customer has no order, the template content is kept in the document. The xml data is :
<my:Data
xmlns:my="https://schemas.mycorp.com">
<my:Customer>
<my:Details>
<my:Name>Some customer</my:Name>
</my:Details>
<my:Orders>
<my:Count>0</my:Count>
<my:OrderList>
</my:OrderList>
</my:Orders>
</my:Customer>
</my:Data>
(see the empty order list).
In Word, the xml pane reflects the correct data (meaning no Order node):
But as you can see, the template content is still here.
Basically, I'd like to hide the order list when there's no order (or at least an empty table).
How can I do that?
PS: If it can help, I uploaded the word and xml files, and a small PowerShell script that injects the data : repro.zip
Thanks for sharing your files so we can better help you.
I had a difficult time trying to solve your problem with your existing Word Content Controls, XML files and the PowerShell script that added the XML to the Word document. I found what seemed to be Microsoft's VSTO example solution to your problem, but I couldn't get this to work cleanly.
I was however able to write a simple C# console application that generates a Word file based on your XML data. The OpenXML code to generate the Word file was generated code from the Open XML Productivity Tool. I then added some logic to read your XML file and generate the second table rows dynamically depending on how many orders there are in the data. I have uploaded the code for you to use if you are interested in this solution. Note: The xml data file should be in c:\temp and the generated word files will be in c:\temp also.
Another added bonus to this solution is if you were to add all of the customer data into one XML file, the application will create separate word files in your temp directory like so:
customer_<name1>.docx
customer_<name2>.docx
customer_<name3>.docx
etc.
Here is the document generated from the first xml file
Here is the document generated from the second xml file with the empty row
Hope this helps.

Combine two TCPDF documents

I'm using TCPDF to create two separate reports in different parts of my website. I would like that, in the end of the first report, the second report should be loaded.
It's different than import a PDF file, because the second report is also generated by TCPDF. Is there a way to do this?
I assume from your question that what you ultimately want to provide is one PDF file that consists of the first PDF concatenated with the second PDF.
One quick and dirty solution is to utilize the pdftk command line PDF processor and call it from within your PHP code using the exec() function. The pdftk command has many features and concatenating files is only one of them, but it does an awesome job. Depending on your hosting situation, this may or may not be an option for you.
The other option would be to use FPDI to import the two PDF files and concatenate them within your PHP code and then send the concatenated version to the user.
More information on using PFDI here:
Merge existing PDF with dynamically generated PDF using TCPDF
Given that you're already using TCPDF, importing the pre-existing file that you want to concatenate with the one you've just created shouldn't be too difficult.
Just add FPDI to your project/composer from:
https://www.setasign.com/products/fpdi/downloads/
Can you still used tcpdf.
FPDI support all the methods of tcpdf, just used new FPDI() instead new tcpdf() the result will be the same in your report, after you create your report marge the files with the code from this page:
https://www.setasign.com/products/fpdi/about/
In a loop, once set the first file and after this set the second...
If you will need help i am here for you.

how import users to AEM/CQ from excel

I have an excel sheet having all the details like user id, emailid ,password ,firstname and lastname. How can import this excel so that it imports are all the users under path /home/users/test.
Either use Apache POI to write some custom code that reads in the rows of the sheet, and then uses the [JackRabbit UserManager][2] library to create the users.
Alternatively, simply save the Excel as a CSV and write a (bash or bat) script that iterates over the CSV file and calls a POST command to create the user:
curl -u admin:admin -FcreateUser= -FauthorizableId=$UserNameReadFromCSV -Frep:password=$PasswordReadFromCSV http://localhost:4502/libs/granite/security/post/authorizables
May be I am late to the party but I have been working on this requirement and created a utility in the AEM for the same.
This utility allows the users to upload an excel file with the user details and creates users in the AEM to the desired group automatically.
https://aem.redquark.org/2019/05/create-users-in-aem-from-excel-file.html
You can see the code for the same at my GitHub. https://github.com/ani03sha/BulkUserCreation
I hope this helps someone.