Customer document

Benutzeravatar
ounos
Member
Beiträge: 44
Registriert: Mi 6. Aug 2014, 11:09

Customer document

Beitragvon ounos » Fr 20. Mär 2015, 17:10

Hey,

my customers have the ability to create wE documents, using some php code and we:write. Is there any way to store also customer owner in the document ? What I would manually do if I open a we document and under Tab: Customer > 'Connect with Customer' assing a customer.

Can I do that using php ?

Thank you in advance!

mokraemer
Senior Member
Beiträge: 3619
Registriert: So 8. Aug 2010, 01:23
Wohnort: Mainz

Re: Customer document

Beitragvon mokraemer » Fr 20. Mär 2015, 18:35

currentliy only using php before calling <we:write>

Code: Alles auswählen

<?php
$GLOBALS['we_' . $type][$name]->WebUserID=$_SESSION['webuser']['ID'];
?>
where $name is the attribute formname and $type is one of (document,object)
webEdition-Kern-Entwickler

e_herrmann
Senior Member
Beiträge: 1319
Registriert: Do 22. Mai 2003, 23:25

Re: Customer document

Beitragvon e_herrmann » Fr 20. Mär 2015, 21:14

@Marc: isn't it possible to use protected in we:write to do this. I think that's what's it for, no?
Elko Herrmann
komplexx | internet.fotografie
web: http://www.komplexx.de

mokraemer
Senior Member
Beiträge: 3619
Registriert: So 8. Aug 2010, 01:23
Wohnort: Mainz

Re: Customer document

Beitragvon mokraemer » Sa 21. Mär 2015, 13:43

@elko: unfortunately not, protected states only, that the document must have the same customer associated to successfully write the document. So this is only in effect on editing documents, not to write new ones. Even if it would write the customer on new documents, it can't update existing ones.
webEdition-Kern-Entwickler

e_herrmann
Senior Member
Beiträge: 1319
Registriert: Do 22. Mai 2003, 23:25

Re: Customer document

Beitragvon e_herrmann » Sa 21. Mär 2015, 14:17

ah, I just saw: it works with objects, but not with documents.
The differences in details between objects and documents are really shitty.
Elko Herrmann
komplexx | internet.fotografie
web: http://www.komplexx.de

mokraemer
Senior Member
Beiträge: 3619
Registriert: So 8. Aug 2010, 01:23
Wohnort: Mainz

Re: Customer document

Beitragvon mokraemer » Sa 21. Mär 2015, 14:50

Ups, no, you're right, both for both this should be written with we:write if protected is set & it's a new document.
The documentation has to be updated on this.
webEdition-Kern-Entwickler

e_herrmann
Senior Member
Beiträge: 1319
Registriert: Do 22. Mai 2003, 23:25

Re: Customer document

Beitragvon e_herrmann » Sa 21. Mär 2015, 15:33

@Marc: ich hatte das auch so verstanden, dass es dafür da ist.
Hab gerade noch einmal geschaut, es geht bei Dokumenten und Objekten!
Elko Herrmann
komplexx | internet.fotografie
web: http://www.komplexx.de

Benutzeravatar
ounos
Member
Beiträge: 44
Registriert: Mi 6. Aug 2014, 11:09

Re: Customer document

Beitragvon ounos » Di 31. Mär 2015, 10:01

JFTR: It worked using we:write attirbute protected=true.


Zurück zu „webEdition Basic Version“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste