Setting an default image in part master creation?

Hi expert, Would you help one thing? I try to set default image when new part is created or existing part is saved without an selected image. So, I created server side code(C#) as below. this.setProperty("thumbnail", "<thumbnail>.././customer/images/LED.jpg</thumbnail>"); When I checked it in database, it is stored in DB. But, when I refresh that part, no image is appeared. I also tried the code below. this.setProperty("thumbnail", "vault:///?fileId=B5F8B4BAEB3343459C758672DA727C5J"); But, it also didn't work. Would you help on this problem? Thanks.    
Parents
  • Hello, Your second attempt of manually setting the image property using this.setProperty("thumbnail", "vault:///?fileId=70508FF9A9744C79AD4E7608342E537F"); should work so long as the file already exists in the database. I would also recommend this approach, so you don't end up with many duplicates of the same file in your vault each time a new part is created. Could you please clarify what kind of server event you are calling this Method from as well as the version of Aras Innovator that you are using? Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hello, Your second attempt of manually setting the image property using this.setProperty("thumbnail", "vault:///?fileId=70508FF9A9744C79AD4E7608342E537F"); should work so long as the file already exists in the database. I would also recommend this approach, so you don't end up with many duplicates of the same file in your vault each time a new part is created. Could you please clarify what kind of server event you are calling this Method from as well as the version of Aras Innovator that you are using? Chris
    Christopher Gillis Aras Labs Software Engineer
Children
No Data