There is an Error 500 in Formular Sandbox
Help with Workflows/Business Rules
Collapse
X
-
try this without using list :
PHP Code:$count = entity\countRelated('posteingang'); // get list of all the related entities Posteingang given the count above and also specifying only one specific stage $posteingang = record\findRelatedMany('Domizilservice', id, 'posteingang', $count, 'createdAt', 'desc', 'status=', 'erledigt (Kunde Inaktiv)'); $i = 0; // loop through collection and update their status while( $i < array\length($posteingang), ( record\update('Posteingang', array\at($posteingang, $i), 'status', 'erfasst'); $i = $i + 1; )
Rabii
Web DevComment
-
I checked everything, the error was actually in the designation. "posteingangs" is correct! But I don't see that name in the entity. Here the plural means "Posteingang"
The following code now works perfectly!
Code:$count = entity\countRelated('posteingangs'); // get list of all the related entities Posteingang given the count above and also specifying only one specific stage $posteingangs = record\findRelatedMany('Domizilservice', id, 'posteingangs', $count, 'createdAt', 'desc', 'status=', list('erledigt (Kunde Inaktiv)')); $i = 0; // loop through collection and update their status while( $i < array\length($posteingangs), ( record\update('Posteingang', array\at($posteingangs, $i), 'status', 'erfasst'); $i = $i + 1; ) );
Thank you very much for your effort. Thanks alot!Comment
Comment