Group Team
In this article, encrption and decryption of a sample code in plsql is shown.

Below code is tested in 11.5.10

declare

dec_str varchar2(2000);
Ret_in_string varchar2(2000);
in_str varchar2(2000):='select dummy from dual';
piv_key varchar2(2000):='8bitekey';
a_var varchar2(100);

begin

if mod(length(in_str),8) != 0 then
      in_str := rpad(in_str,length(in_str)+8-mod(length(in_str),8),chr(0));
      dbms_output.put_line('Input_string->:'in_str);
end if;

dec_str:=dbms_obfuscation_toolkit.desencrypt(input_string=>in_str, key_string=>piv_key);

--below command for decrypting the same.
dbms_output.put_line('encrypt_string:->'dec_str);
Ret_in_string := dbms_obfuscation_toolkit.desdecrypt(input_string=>dec_str, key_string=>piv_key); dbms_output.put_line('decrypt_string:->'Ret_in_string);
end;
Labels: 0 comments | edit post
Group Team
In this article, we will see how to disable the Ship Confirm button in Shipping Transaction Form for any specific delivery name using C3 Augument.

Form Name for Shipping Transaction form is WSHFSTRX.

In the C3 Augumenter form, select the Form Name “WSHFSTRX”.
Advance Block

Go to Advance tab.
Enter the sequence number “10”.
In the description, give meaningful name. We have given” Disable Ship Confirm Button when delivery number is 99846385”.
In the event name enter “WHEN-NEW-RECORD-INSTANCE”

we need to give the block name. Block name for the delivery name can be found from the shipping transaction form itself. Select the delivery name is shipping transaction form. Then goto HELP -->Diagnostics-->Examine. We can see that block name is ‘DLVY’.

Enable the Advanced block by selecting the enabled check box.

Condition Block
In the condition block, we can specify the condition when the action need to be executed.
Enter the sequence number as 10.
Next we need to enter the condition type.


Following are the condition type which can be used
a. Item Value
b. Constant
c. SQL Statement
d. Profile Value
e. Application
f. Responsibility
g. User
h. Organization
i. Language

We have selected SQL Statement for the Cond Left Type.
In the cond Left Text, specify the sql statement to be executed.
In this case we have given following
Select name from wsh_deliveries where name =&P_DELIVERY_NAME

&P_DELIVERY_NAME is the parameter. It is explained in later section.

In the Join type select “Equal = “.
In the Cond Right Type, select Constant from the List Value.
In the cond Right Text, enter the valid delivery name when the ship confirm button need to be disabled.
99846385 is a valid delivery name.
Enable the conditions by selecting the enabled check box.
Parameter creation
&P_DELIVERY_NAME is used in the query. We will see how to use it.
Click on the Parameter button.
In the Param Name enter P_DELIVERY_NAME.
In the Param type enter “Item”.

Param value we need to enter the delivery name details. i.e BLOCK.FIELD_NAME
For delivery name, it is DLVY.NAME


Actions Block
In this block we need to specify the action that need to be performed. In our case, we need to disable the Ship Confirm button.
Enter the sequence number as 10.
In the Action type, enter “Set Item Property”.
In the action item we need to specify the Ship Confirm button details. i.e BLOCK.FIELD_NAME

For Ship Confirm button, it is DLVY_BUTTONS.BUTTON5
In the value type, enter ‘ENABLED’.
In the Action Value, enter the value as ‘N’.
Enable the action also.

Open the shipping transaction form and Query based on the delivery name “99846385”.
 
We can see that Ship Confirm button will be disabled.




Group Team

In this article we will see how to disable the Ship Confirm button in Shipping Transaction Form for any specific delivery name.

Navigation: Shipping -->Shipping Transaction

In the shipping transaction window, query for the any existing delivery name for which we want to disable the ship confirm button.Go to Help -->Diagnostics -->Custom Code -->Personalize
We can see the below screen. Function name for Shipping Transaction form is WSHFSTRX.
Condition Tab
Enter the sequence number as 10 and in the description give meaningful name. We have given” Disable Ship Confirm Button when delivery number is 99846385”.
In the condition tab, select the trigger event as ‘WHEN-NEW-RECORD-INSTANCE’.
In the trigger object we need to give the block name. Block name for the delivery name can be found from the shipping transaction form itself. Select the delivery name is shipping transaction form. Then goto HELP -->Diagnostics-->Examine. We can see that block name is ‘DLVY’. So in the triggering object we are giving the Trigger Object as ‘DLVY’.
In the condition need to give the condition when the trigger need to be executed.To access the exact value from the form for delivery name, we need to give “BLOCKNAME.Field_name”. In our case block name is DLVY and field name is NAME.

Hence in the condition we have to enter the following
“If DLVY.NAME = 99846385 THEN”.
Only when the delivery name is 99846385 the trigger will be executed.

Action Tab
Click on Action Tab.
Enter Sequence as 10.
Select the Type as ‘Property’.
In object type select Item.
In target object we need to give the Ship Confirm button detail. AS explained earlier get the block and field name based on the Examine which is available in Help Menu.
Block Name and Item name for Ship Confirm button is DLVY_BUTTONS and BUTTON5 respectively.
In the property Name, select ENABLED.In the value enter as ‘FALSE’.Once all are entered, save the form.





Close the shipping transaction form and reopen it. Query based on the delivery name “99846385”. We can see that Ship Confirm button will be disabled.