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!
Customer document
Re: Customer document
currentliy only using php before calling <we:write>
where $name is the attribute formname and $type is one of (document,object)
Code: Alles auswählen
<?php
$GLOBALS['we_' . $type][$name]->WebUserID=$_SESSION['webuser']['ID'];
?>
webEdition-Kern-Entwickler
-
- Senior Member
- Beiträge: 1319
- Registriert: Do 22. Mai 2003, 23:25
Re: Customer document
@Marc: isn't it possible to use protected in we:write to do this. I think that's what's it for, no?
Re: Customer document
@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
-
- Senior Member
- Beiträge: 1319
- Registriert: Do 22. Mai 2003, 23:25
Re: Customer document
ah, I just saw: it works with objects, but not with documents.
The differences in details between objects and documents are really shitty.
The differences in details between objects and documents are really shitty.
Re: Customer document
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.
The documentation has to be updated on this.
webEdition-Kern-Entwickler
-
- Senior Member
- Beiträge: 1319
- Registriert: Do 22. Mai 2003, 23:25
Re: Customer document
@Marc: ich hatte das auch so verstanden, dass es dafür da ist.
Hab gerade noch einmal geschaut, es geht bei Dokumenten und Objekten!
Hab gerade noch einmal geschaut, es geht bei Dokumenten und Objekten!
Re: Customer document
JFTR: It worked using we:write attirbute protected=true.
Wer ist online?
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast