wpyourname
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Dynamics 365 Integration] Add Edit/Delete buttons to tableI had to do this:
Add “delete” mode to the array in “AbstractForm” class.
Then replaced the line 380 of class “FormInstance” to this:} else if ( $this->mode == "create" ) { $result = ASDK()->create( $this->entity ); } else { $result = ASDK()->delete( $this->entity ); }And finally in the “inline-form.php” adding this code:
function accessProtected($obj, $prop) { $reflection = new ReflectionClass($obj); $property = $reflection->getProperty($prop); $property->setAccessible(true); return $property->getValue($obj); } $fmode = accessProtected($form,'mode'); $isDelete= $fmode=='delete'; ..... if($isDelete == true){ ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("form.entity-form :input:not([type=submit], [type=hidden], [type=button])").prop("disabled", true); }); </script> <?php }Sorry for bad codes im a php nerd at best.
I fixed your second code and it did worked:
Changed this:
redirect_url="{{ '/filteredAccounts/?reqid=' ~ querystring.reqid }}"To this:
redirect_url="/filteredAccounts/?reqid={{params.reqid}}"Thanks for the codes, but the first one shows this error:
Unexpected error: Unexpected token "punctuation" of value "." ("operator" expected with value "=") in "template_0f5e87ae22b85506d7a47e40d86b22c6cc72e514" at line 1.And the second one redirects with no value for “reqid” parameter.
Viewing 3 replies - 1 through 3 (of 3 total)