8/18/2025 5:28:44 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Insert File Attachment function 
Posted: 10 Feb 08 11:54 AM
|
I am using saleslogix 6.2.6 , i added a new main form for the contract table , i copy the ticket plugin attachment and modify it in order to use the new contractid , i have the main table with also the accountid on. If i am using the insertfileattachmnet from the main view account and subform contract , the system save in the table tha contractid , the attachid , the accountid without no problem, if i am using the same function with the new main form contract , on the record are stored just the contractid and attachid and non write the accountid. there is any soluition to this problem, thanks.
|
|
|
|
Re: Insert File Attachment function 
Posted: 10 Feb 08 2:21 PM
|
When you say 'main form', I am assuming that you mean main view? If so, your problem is that you are not associated with any specific account when you insert the attachment from the new main view. That is, at the time that you are running the insert,
Application.BasicFunctions.CurrentAccountID
will not be populated. So the bottom line is that you'll have to do it yourself using script, and possibly a global variable to pass info (ie AccountID) from another MV.
Phil
|
|
|
|
Re: Insert File Attachment function 
Posted: 11 Feb 08 2:59 AM
|
Thanks very much for you reply , but i really do not understand. At the moment that i do the function insertfileattachment , i have an accountid specified on the main view contract , it is not the current accountid , so means i need to use this account like current accountid or how can i use the global variable ?? or using a script ? Please can you explain me more.
|
|
|
|
Re: Insert File Attachment function 
Posted: 11 Feb 08 4:33 PM
|
If you follow what the script behind the form does when you click on the Insert File button you'll see that it runs this
Application.BasicFunctions.InsertFileAttachment
which does a few things, the most important of which (for your purposes) is writing a record to the ATTACHMENT table. You'll see that there is an AccountID field in the table - if you check/modify that field for the newly inserted attachment record, it should work as you want.
Phil
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|