Writing of catalog attributes

Accounting and inventory IFRS/GAAP suite for SMB. General questions. See 1C:AccountingSuite details

#1
People who like this:0Yes/0No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Hi!

In Posting of CashPurchase I am trying to write an attribute value of the catalog 'products'.

Code
Product = Catalogs.Products;
CatalogSelection = Product.Select(CurRowLineItems.Product);
Object = CatalogSelection.GetObject();
Object.ListPriceSupplier = 1; // here 1 is just for testing

I get an error "no element selected".

How should I modify it?

Thanks

 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Nov 19, 2012
Company:

Hi!

Try using this code:

Code
Object = CurRowLineItems.Product.GetObject();
Object.ListPriceSupplier = 1; // here 1 is just for testing 

But it's not a good decision to write something in catalog like this when document posting. You must try to find another solution for this task.

Edited: Aleksey Bochkov - May 09, 2013 08:01 PM
 
#3
People who like this:0Yes/0No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Thanks, Alexey! It does work. But what could be another solution? Actually I need MainSupplier (Vendor). And it should be changed when posting of the document. Do you have some another idea?

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

If you are changing contacts, for example, you need to store contacts inside the document and add a button which performs saving these values to the selected product.
If you want to keep the number of documents where this product was used, or something like that, you can add an information register where this data will be stored.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.